Skip to content

Commit

Permalink
[glew] Add public definition GLEW_NO_GLU
Browse files Browse the repository at this point in the history
  • Loading branch information
WangWeiLin-MV committed Feb 6, 2025
1 parent a0ea252 commit 8b4f45e
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 3 deletions.
31 changes: 31 additions & 0 deletions ports/freetype-gl/0006-link-targets-glew.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f8d7dd..40d72f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,7 +112,7 @@ include_directories(
${OPENGL_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
- ${GLEW_INCLUDE_PATH}
+
${PROJECT_BINARY_DIR}
)

@@ -196,7 +196,7 @@ target_link_libraries(freetype-gl
${OPENGL_LIBRARY}
${FREETYPE_LIBRARIES}
${MATH_LIBRARY}
- ${GLEW_LIBRARY}
+ GLEW::GLEW
)

if(freetype-gl_BUILD_MAKEFONT)
@@ -207,7 +207,7 @@ if(freetype-gl_BUILD_MAKEFONT)
${OPENGL_LIBRARY}
${FREETYPE_LIBRARIES}
${MATH_LIBRARY}
- ${GLEW_LIBRARY}
+ GLEW::GLEW
)

if(MSVC AND NOT (MSVC_VERSION LESS 1900))
1 change: 1 addition & 0 deletions ports/freetype-gl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vcpkg_from_github(
0003-Add-exports.patch
0004-Change-install-dir-for-pkgconfig.patch
0005-add-version.patch
0006-link-targets-glew.patch
)

vcpkg_check_features(
Expand Down
1 change: 1 addition & 0 deletions ports/freetype-gl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "freetype-gl",
"version": "1.0",
"port-version": 1,
"description": "OpenGL text using one vertex buffer, one texture and FreeType",
"homepage": "https://github.com/rougier/freetype-gl",
"dependencies": [
Expand Down
12 changes: 12 additions & 0 deletions ports/glew/0004-definition-GLEW_NO_GLU.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt
index 25fb90b..68b977d 100644
--- a/build/cmake/CMakeLists.txt
+++ b/build/cmake/CMakeLists.txt
@@ -155,6 +155,7 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12)
else()
target_compile_definitions(glew_s INTERFACE "GLEW_STATIC")
foreach(t glew glew_s)
+ target_compile_definitions(${t} PUBLIC $<INSTALL_INTERFACE:GLEW_NO_GLU>)
target_include_directories(${t} PUBLIC $<INSTALL_INTERFACE:include>)
endforeach()
set(MAYBE_EXPORT EXPORT glew-targets)
1 change: 1 addition & 0 deletions ports/glew/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ vcpkg_extract_source_archive(
PATCHES
fix-LNK2019.patch
base_address.patch # Accepted upstream as https://github.com/nigels-com/glew/commit/ef7d12ecb7f1f336f6d3a80cebd6163b2c094108
0004-definition-GLEW_NO_GLU.patch
)

vcpkg_cmake_configure(
Expand Down
2 changes: 1 addition & 1 deletion ports/glew/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "glew",
"version": "2.2.0",
"port-version": 4,
"port-version": 5,
"description": "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.",
"homepage": "https://github.com/nigels-com/glew",
"supports": "!android",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2922,7 +2922,7 @@
},
"freetype-gl": {
"baseline": "1.0",
"port-version": 0
"port-version": 1
},
"freexl": {
"baseline": "2.0.0",
Expand Down Expand Up @@ -3130,7 +3130,7 @@
},
"glew": {
"baseline": "2.2.0",
"port-version": 4
"port-version": 5
},
"glfw3": {
"baseline": "3.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/freetype-gl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "71dfebb898ff8cecac6cc59d8a865a56712a783f",
"version": "1.0",
"port-version": 1
},
{
"git-tree": "214e21b36f0f4b0ae0d9514eed1eba20f3c2ff4d",
"version": "1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/glew.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3c70117b6ee330758f04a593be04d75a5d45fdd8",
"version": "2.2.0",
"port-version": 5
},
{
"git-tree": "bf42d73479dcd0f239b71dbed4d0d3af22efb294",
"version": "2.2.0",
Expand Down

0 comments on commit 8b4f45e

Please sign in to comment.