Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[glew] Add public definition GLEW_NO_GLU [colmap] Remove feature cuda #43641

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions ports/colmap/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ set(TESTS_ENABLED OFF)
set(CGAL_ENABLED OFF)
set(OPENMP_ENABLED ON)

if("cuda" IN_LIST FEATURES)
set(CUDA_ENABLED ON)
set(CUDA_ARCHITECTURES "native")
endif()

if("cuda-redist" IN_LIST FEATURES)
set(CUDA_ENABLED ON)
set(CUDA_ARCHITECTURES "all-major")
endif()

if("gui" IN_LIST FEATURES)
set(GUI_ENABLED ON)
endif()
Expand All @@ -61,8 +51,8 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DCUDA_ENABLED=${CUDA_ENABLED}
-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES}
-DOPENGL_ENABLED=OFF
-DCUDA_ENABLED=OFF
-DGUI_ENABLED=${GUI_ENABLED}
-DTESTS_ENABLED=${TESTS_ENABLED}
-DGIT_COMMIT_ID=${GIT_COMMIT_ID}
Expand Down
15 changes: 1 addition & 14 deletions ports/colmap/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "colmap",
"version": "3.11.1",
"port-version": 1,
"port-version": 2,
"description": "COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline with a graphical and command-line interface. It offers a wide range of features for reconstruction of ordered and unordered image collections. The software is licensed under the new BSD license.",
"homepage": "https://colmap.github.io/",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -51,19 +51,6 @@
"cgal"
]
},
"cuda": {
"description": "Build with CUDA.",
"dependencies": [
"cuda",
"glew"
]
},
"cuda-redist": {
"description": "Redistributable CUDA support for common supported compute architectures.",
"dependencies": [
"cuda"
]
},
Comment on lines -54 to -66
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nobody wants to remove CUDA from COLMAP. (Or back to 🧮?)

"gui": {
"description": "Build the GUI.",
"dependencies": [
Expand Down
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typical patch which will breaks users 💣

)

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
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@
},
"colmap": {
"baseline": "3.11.1",
"port-version": 1
"port-version": 2
},
"color-console": {
"baseline": "2022-03-20",
Expand Down 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/c-/colmap.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "14eb5a12afab6ead03f10d6cd08da710c9dfbc9d",
"version": "3.11.1",
"port-version": 2
},
{
"git-tree": "7f2f32bedf07a0ac7a5bc43b81268b20b41b060e",
"version": "3.11.1",
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
Loading