From 1b714144175ccb7556dfd16d956becf9550168b0 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Mon, 13 Jul 2020 23:03:11 +0200 Subject: [PATCH 01/18] [colmap] Add port for COLMAP 3.6-dev.3 --- ports/colmap/CONTROL | 9 +++++++++ ports/colmap/portfile.cmake | 31 +++++++++++++++++++++++++++++++ ports/colmap/usage | 10 ++++++++++ 3 files changed, 50 insertions(+) create mode 100644 ports/colmap/CONTROL create mode 100644 ports/colmap/portfile.cmake create mode 100644 ports/colmap/usage diff --git a/ports/colmap/CONTROL b/ports/colmap/CONTROL new file mode 100644 index 00000000000000..9ea3ce50153657 --- /dev/null +++ b/ports/colmap/CONTROL @@ -0,0 +1,9 @@ +Source: colmap +Version: 3.6-dev.3 +Build-Depends: boost-program-options, boost-filesystem, boost-graph, boost-regex, boost-system, boost-test, eigen3, suitesparse, freeimage, glog, gflags, glew, qt5-base, cgal[qt], ceres +Homepage: https://github.com/colmap/colmap +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. Documentation: https://colmap.github.io/ + +Feature: cuda +Build-Depends: cuda +Description: CUDA support for COLMAP diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake new file mode 100644 index 00000000000000..681bfbf92e13fa --- /dev/null +++ b/ports/colmap/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO colmap/colmap + REF 3.6-dev.3 + SHA512 7eec27fced20f43547e67e9824d33c8412b17c2c80d29d8346d583cef3f7598b59c7c10a0556b857e31106c9312aace54c5dee65b8465974930f35b58331304a + HEAD_REF dev +) + +set(CUDA_ENABLED OFF) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + cuda CUDA_ENABLED +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/colmap/usage b/ports/colmap/usage new file mode 100644 index 00000000000000..4042a0f5295f64 --- /dev/null +++ b/ports/colmap/usage @@ -0,0 +1,10 @@ +To see the full list of command-line options: + + colmap -h + colmap gui + + +If you want to include and link COLMAP against your own library: + + find_package(COLMAP REQUIRED) + target_link_libraries(main ${COLMAP_LIBRARIES}) From 953b5ad9e665ab805b105478fe3a787a1b2ebe49 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Mon, 13 Jul 2020 23:57:53 +0200 Subject: [PATCH 02/18] Fixed some errors in portfile --- ports/colmap/portfile.cmake | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index 681bfbf92e13fa..88f0543a3a4f9e 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -20,8 +20,24 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/include/colmap/exe" + "${CURRENT_PACKAGES_DIR}/debug/include/colmap/lib/Graclus/multilevelLib" + "${CURRENT_PACKAGES_DIR}/debug/include/colmap/tools" + "${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/media" + "${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/shaders" + "${CURRENT_PACKAGES_DIR}/include/colmap/exe" + "${CURRENT_PACKAGES_DIR}/include/colmap/lib/Graclus/multilevelLib" + "${CURRENT_PACKAGES_DIR}/include/colmap/tools" + "${CURRENT_PACKAGES_DIR}/include/colmap/ui/media" + "${CURRENT_PACKAGES_DIR}/include/colmap/ui/shaders" + "${CURRENT_PACKAGES_DIR}/COLMAP.bat" + "${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat" + "${CURRENT_PACKAGES_DIR}/debug/COLMAP.bat" + "${CURRENT_PACKAGES_DIR}/debug/RUN_TESTS.bat" +) vcpkg_copy_pdbs() From 948e6b49abec1645781d99e0203ec4fcd1958b4b Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Tue, 14 Jul 2020 18:04:21 +0200 Subject: [PATCH 03/18] Fixing some errors in portfile. These changes also move the binary (and *.bat) to `tools/` otherwise I get `POST_BUILD_CHECKS_FAILED`. I followed this recommendation: https://github.com/Microsoft/vcpkg/issues/834#issuecomment-288529839 Now the *.bat files need to be fixed with the correct path to `tools/` --- ports/colmap/portfile.cmake | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index 88f0543a3a4f9e..ec3d321a48e7dd 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -33,12 +33,29 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/colmap/tools" "${CURRENT_PACKAGES_DIR}/include/colmap/ui/media" "${CURRENT_PACKAGES_DIR}/include/colmap/ui/shaders" - "${CURRENT_PACKAGES_DIR}/COLMAP.bat" - "${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat" "${CURRENT_PACKAGES_DIR}/debug/COLMAP.bat" "${CURRENT_PACKAGES_DIR}/debug/RUN_TESTS.bat" + "${CURRENT_PACKAGES_DIR}/debug/bin" ) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(RENAME + ${CURRENT_PACKAGES_DIR}/bin/colmap.exe + ${CURRENT_PACKAGES_DIR}/tools/colmap.exe +) + +file(RENAME + ${CURRENT_PACKAGES_DIR}/COLMAP.bat + ${CURRENT_PACKAGES_DIR}/tools/COLMAP.bat +) + +file(RENAME + ${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat + ${CURRENT_PACKAGES_DIR}/tools/RUN_TESTS.bat +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/COPYING.txt From d09c1a72cfeaf7603cd7ecb5f0e0b0b876198ca6 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Fri, 17 Jul 2020 09:40:15 +0200 Subject: [PATCH 04/18] Update ports/colmap/portfile.cmake Co-authored-by: Robert Schumacher --- ports/colmap/portfile.cmake | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index ec3d321a48e7dd..2fbd9f7dd3c40b 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -38,17 +38,7 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" ) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) -file(RENAME - ${CURRENT_PACKAGES_DIR}/bin/colmap.exe - ${CURRENT_PACKAGES_DIR}/tools/colmap.exe -) - -file(RENAME - ${CURRENT_PACKAGES_DIR}/COLMAP.bat - ${CURRENT_PACKAGES_DIR}/tools/COLMAP.bat -) - +vcpkg_copy_tools(TOOL_NAMES colmap AUTO_CLEAN) file(RENAME ${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat ${CURRENT_PACKAGES_DIR}/tools/RUN_TESTS.bat From 0d26792534245e6766a26c7187db2cf57244e564 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Fri, 17 Jul 2020 09:41:12 +0200 Subject: [PATCH 05/18] Update ports/colmap/portfile.cmake Co-authored-by: Robert Schumacher --- ports/colmap/portfile.cmake | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index 2fbd9f7dd3c40b..ea0a2805faa52c 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -39,11 +39,7 @@ file(REMOVE_RECURSE ) vcpkg_copy_tools(TOOL_NAMES colmap AUTO_CLEAN) -file(RENAME - ${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat - ${CURRENT_PACKAGES_DIR}/tools/RUN_TESTS.bat -) - +file(REMOVE ${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") vcpkg_copy_pdbs() From 4eaeb0ea47c5ba8bedbbdb24305a4386ba513cb8 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Fri, 17 Jul 2020 09:41:33 +0200 Subject: [PATCH 06/18] Update ports/colmap/usage Co-authored-by: Robert Schumacher --- ports/colmap/usage | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ports/colmap/usage b/ports/colmap/usage index 4042a0f5295f64..344cfe3ecc5381 100644 --- a/ports/colmap/usage +++ b/ports/colmap/usage @@ -1,10 +1,4 @@ -To see the full list of command-line options: - - colmap -h - colmap gui - - -If you want to include and link COLMAP against your own library: +The package colmap provides CMake integration: find_package(COLMAP REQUIRED) target_link_libraries(main ${COLMAP_LIBRARIES}) From fe2b988c9f1d82f140403d0e56020b4e31ff43d2 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Fri, 17 Jul 2020 13:08:00 +0200 Subject: [PATCH 07/18] First working version, the line `vcpkg_copy_tools(TOOL_NAMES colmap AUTO_CLEAN)` helped. Now it does work running: > \vcpkg\packages\colmap_x64-windows\tools\colmap\colmap.exe > \vcpkg\packages\colmap_x64-windows\tools\colmap\colmap.exe gui ToDo: use `vcpkg.json`. --- ports/colmap/portfile.cmake | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index ea0a2805faa52c..f74ab7e117d46e 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -20,28 +20,28 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets() +vcpkg_copy_tools(TOOL_NAMES colmap AUTO_CLEAN) + file(REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/debug/include" - "${CURRENT_PACKAGES_DIR}/debug/share" - "${CURRENT_PACKAGES_DIR}/debug/include/colmap/exe" - "${CURRENT_PACKAGES_DIR}/debug/include/colmap/lib/Graclus/multilevelLib" - "${CURRENT_PACKAGES_DIR}/debug/include/colmap/tools" - "${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/media" - "${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/shaders" - "${CURRENT_PACKAGES_DIR}/include/colmap/exe" - "${CURRENT_PACKAGES_DIR}/include/colmap/lib/Graclus/multilevelLib" - "${CURRENT_PACKAGES_DIR}/include/colmap/tools" - "${CURRENT_PACKAGES_DIR}/include/colmap/ui/media" - "${CURRENT_PACKAGES_DIR}/include/colmap/ui/shaders" - "${CURRENT_PACKAGES_DIR}/debug/COLMAP.bat" - "${CURRENT_PACKAGES_DIR}/debug/RUN_TESTS.bat" - "${CURRENT_PACKAGES_DIR}/debug/bin" + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/exe + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/lib/Graclus/multilevelLib + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/tools + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/media + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/shaders + ${CURRENT_PACKAGES_DIR}/include/colmap/exe + ${CURRENT_PACKAGES_DIR}/include/colmap/lib/Graclus/multilevelLib + ${CURRENT_PACKAGES_DIR}/include/colmap/tools + ${CURRENT_PACKAGES_DIR}/include/colmap/ui/media + ${CURRENT_PACKAGES_DIR}/include/colmap/ui/shaders + ${CURRENT_PACKAGES_DIR}/COLMAP.bat + ${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat + ${CURRENT_PACKAGES_DIR}/debug/COLMAP.bat + ${CURRENT_PACKAGES_DIR}/debug/RUN_TESTS.bat + ${CURRENT_PACKAGES_DIR}/debug/bin ) -vcpkg_copy_tools(TOOL_NAMES colmap AUTO_CLEAN) -file(REMOVE ${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat) -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") - vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/COPYING.txt From 206b3ce49d74b520bf988d7d1087b4cfd07d30ee Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Fri, 17 Jul 2020 14:00:30 +0200 Subject: [PATCH 08/18] Using `vcpkg.json` instead of CONTROL file --- ports/colmap/CONTROL | 9 --------- ports/colmap/vcpkg.json | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 9 deletions(-) delete mode 100644 ports/colmap/CONTROL create mode 100644 ports/colmap/vcpkg.json diff --git a/ports/colmap/CONTROL b/ports/colmap/CONTROL deleted file mode 100644 index 9ea3ce50153657..00000000000000 --- a/ports/colmap/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: colmap -Version: 3.6-dev.3 -Build-Depends: boost-program-options, boost-filesystem, boost-graph, boost-regex, boost-system, boost-test, eigen3, suitesparse, freeimage, glog, gflags, glew, qt5-base, cgal[qt], ceres -Homepage: https://github.com/colmap/colmap -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. Documentation: https://colmap.github.io/ - -Feature: cuda -Build-Depends: cuda -Description: CUDA support for COLMAP diff --git a/ports/colmap/vcpkg.json b/ports/colmap/vcpkg.json new file mode 100644 index 00000000000000..6958cc90659220 --- /dev/null +++ b/ports/colmap/vcpkg.json @@ -0,0 +1,34 @@ +{ + "name": "colmap", + "version-string": "3.6-dev.3", + "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.", + "license": "BSD-3-Clause", + "homepage": "https://colmap.github.io/", + "dependencies": [ + "boost-program-options", + "boost-filesystem", + "boost-graph", + "boost-regex", + "boost-system", + "boost-test", + "eigen3", + "suitesparse", + "freeimage", + "glog", + "gflags", + "glew", + "qt5-base", + "ceres", + { + "name": "cgal", + "features": [ "qt" ] + } + ], + "features": [ + { + "name": "cuda", + "dependencies": [ "cuda" ], + "description": "COLMAP with CUDA support" + } + ] +} From 34dd0bffb1d388d71b05965538f1f34f1a6decde Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Sun, 19 Jul 2020 00:54:11 +0200 Subject: [PATCH 09/18] Formatting json file: ./vcpkg.exe x-format-manifest --all --- ports/colmap/vcpkg.json | 72 ++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/ports/colmap/vcpkg.json b/ports/colmap/vcpkg.json index 6958cc90659220..4c39178087cdeb 100644 --- a/ports/colmap/vcpkg.json +++ b/ports/colmap/vcpkg.json @@ -1,34 +1,38 @@ -{ - "name": "colmap", - "version-string": "3.6-dev.3", - "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.", - "license": "BSD-3-Clause", - "homepage": "https://colmap.github.io/", - "dependencies": [ - "boost-program-options", - "boost-filesystem", - "boost-graph", - "boost-regex", - "boost-system", - "boost-test", - "eigen3", - "suitesparse", - "freeimage", - "glog", - "gflags", - "glew", - "qt5-base", - "ceres", - { - "name": "cgal", - "features": [ "qt" ] - } - ], - "features": [ - { - "name": "cuda", - "dependencies": [ "cuda" ], - "description": "COLMAP with CUDA support" - } - ] -} +{ + "name": "colmap", + "version-string": "3.6-dev.3", + "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.", + "license": "BSD-3-Clause", + "homepage": "https://colmap.github.io/", + "dependencies": [ + "boost-program-options", + "boost-filesystem", + "boost-graph", + "boost-regex", + "boost-system", + "boost-test", + "eigen3", + "suitesparse", + "freeimage", + "glog", + "gflags", + "glew", + "qt5-base", + "ceres", + { + "name": "cgal", + "features": [ + "qt" + ] + } + ], + "features": [ + { + "name": "cuda", + "dependencies": [ + "cuda" + ], + "description": "COLMAP with CUDA support" + } + ] +} From 2d40b353667a6c859e8889d48a4cd530f8f62110 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Mon, 20 Jul 2020 12:38:50 +0200 Subject: [PATCH 10/18] Changes suggested by @ahojnnes (colmap author). Waiting for the 3.7 release (probably today) to update the `REF` and `SHA512` --- ports/colmap/portfile.cmake | 11 +++++++---- ports/colmap/usage | 6 ++++++ ports/colmap/vcpkg.json | 9 ++++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index f74ab7e117d46e..be118536dff303 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -6,14 +6,17 @@ vcpkg_from_github( HEAD_REF dev ) -set(CUDA_ENABLED OFF) -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - cuda CUDA_ENABLED -) +if("cuda-redist" IN_LIST FEATURES) + set(CUDA_ENABLED ON) + set(CUDA_ARCHS "Common") +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DCUDA_ENABLED=${CUDA_ENABLED} + -DCUDA_ARCHS=${CUDA_ARCHS} ) vcpkg_install_cmake() diff --git a/ports/colmap/usage b/ports/colmap/usage index 344cfe3ecc5381..b71316b3cf81a3 100644 --- a/ports/colmap/usage +++ b/ports/colmap/usage @@ -1,3 +1,9 @@ +For example, under Windows, execute COLMAP as: + + \packages\colmap_\tools\colmap\colmap.exe gui + \packages\colmap_\tools\colmap\colmap.exe mapper + \packages\colmap_\tools\colmap\colmap.exe ... + The package colmap provides CMake integration: find_package(COLMAP REQUIRED) diff --git a/ports/colmap/vcpkg.json b/ports/colmap/vcpkg.json index 4c39178087cdeb..dc2731e6ac275c 100644 --- a/ports/colmap/vcpkg.json +++ b/ports/colmap/vcpkg.json @@ -32,7 +32,14 @@ "dependencies": [ "cuda" ], - "description": "COLMAP with CUDA support" + "description": "CUDA support for current compute architecture of this machine." + }, + { + "name": "cuda-redist", + "dependencies": [ + "cuda" + ], + "description": "Redistributable CUDA support for common supported compute architectures." } ] } From 40fff4c6d6bba966eeab64167697dd88753cd445 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Mon, 20 Jul 2020 16:21:14 +0200 Subject: [PATCH 11/18] Changes proposed from @ahojnne to handle the internal colmap variables `DGIT_COMMIT_ID` and `DGIT_COMMIT_DATE` --- ports/colmap/portfile.cmake | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index be118536dff303..aafa2fc3c6d015 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -1,11 +1,26 @@ +set(COLMAP_REF "3.6-dev.3") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO colmap/colmap - REF 3.6-dev.3 + REF ${COLMAP_REF} SHA512 7eec27fced20f43547e67e9824d33c8412b17c2c80d29d8346d583cef3f7598b59c7c10a0556b857e31106c9312aace54c5dee65b8465974930f35b58331304a HEAD_REF dev ) +set(CUDA_ENABLED OFF) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + cuda CUDA_ENABLED +) + +if(DEFINED VCPKG_HEAD_VERSION) + set(COLMAP_GIT_COMMIT_ID "${VCPKG_HEAD_VERSION}") +else() + set(COLMAP_GIT_COMMIT_ID "${COLMAP_REF}") +endif() + +string(TIMESTAMP COLMAP_GIT_COMMIT_DATE "%Y-%m-%d") + if("cuda-redist" IN_LIST FEATURES) set(CUDA_ENABLED ON) set(CUDA_ARCHS "Common") @@ -17,6 +32,8 @@ vcpkg_configure_cmake( OPTIONS -DCUDA_ENABLED=${CUDA_ENABLED} -DCUDA_ARCHS=${CUDA_ARCHS} + -DGIT_COMMIT_ID=${COLMAP_GIT_COMMIT_ID} + -DGIT_COMMIT_DATE=${COLMAP_GIT_COMMIT_DATE} ) vcpkg_install_cmake() From 29ed8c6c6aa0e1dcba1bd47f07293137ebf1d71b Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Tue, 21 Jul 2020 01:47:12 +0200 Subject: [PATCH 12/18] Enabling TESTS (changes sent by @ahojnnes) --- ports/colmap/portfile.cmake | 33 ++++++++++++++++++++++++--------- ports/colmap/vcpkg.json | 4 ++++ 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index aafa2fc3c6d015..dca822db41d65a 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -8,31 +8,39 @@ vcpkg_from_github( HEAD_REF dev ) -set(CUDA_ENABLED OFF) -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - cuda CUDA_ENABLED -) - +# set GIT_COMMIT_ID and GIT_COMMIT_DATE if(DEFINED VCPKG_HEAD_VERSION) - set(COLMAP_GIT_COMMIT_ID "${VCPKG_HEAD_VERSION}") + set(GIT_COMMIT_ID "${VCPKG_HEAD_VERSION}") else() - set(COLMAP_GIT_COMMIT_ID "${COLMAP_REF}") + set(GIT_COMMIT_ID "${COLMAP_REF}") endif() string(TIMESTAMP COLMAP_GIT_COMMIT_DATE "%Y-%m-%d") +set(CUDA_ENABLED OFF) +set(TESTS_ENABLED OFF) + +if("cuda" IN_LIST FEATURES) + set(CUDA_ENABLED ON) +endif() + if("cuda-redist" IN_LIST FEATURES) set(CUDA_ENABLED ON) set(CUDA_ARCHS "Common") endif() +if("tests" IN_LIST FEATURES) + set(TESTS_ENABLED ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DCUDA_ENABLED=${CUDA_ENABLED} -DCUDA_ARCHS=${CUDA_ARCHS} - -DGIT_COMMIT_ID=${COLMAP_GIT_COMMIT_ID} + -DTESTS_ENABLED=${TESTS_ENABLED} + -DGIT_COMMIT_ID=${GIT_COMMIT_ID} -DGIT_COMMIT_DATE=${COLMAP_GIT_COMMIT_DATE} ) @@ -40,8 +48,15 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets() -vcpkg_copy_tools(TOOL_NAMES colmap AUTO_CLEAN) +file(GLOB TOOL_FILENAMES "${CURRENT_PACKAGES_DIR}/bin/*") +foreach(TOOL_FILENAME ${TOOL_FILENAMES}) + get_filename_component(TEST_TOOL_NAME ${TOOL_FILENAME} NAME_WLE) + list(APPEND COLMAP_TOOL_NAMES "${TEST_TOOL_NAME}") +endforeach() + +vcpkg_copy_tools(TOOL_NAMES ${COLMAP_TOOL_NAMES} AUTO_CLEAN) +# remove empty folders and unused files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share diff --git a/ports/colmap/vcpkg.json b/ports/colmap/vcpkg.json index dc2731e6ac275c..0c99b0dbd7c752 100644 --- a/ports/colmap/vcpkg.json +++ b/ports/colmap/vcpkg.json @@ -40,6 +40,10 @@ "cuda" ], "description": "Redistributable CUDA support for common supported compute architectures." + }, + { + "name": "tests", + "description": "Enable TESTS." } ] } From eeb1df7173b9b82a05119d04ee1940d8beb2cf58 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Fri, 24 Jul 2020 14:03:11 +0200 Subject: [PATCH 13/18] Updated to lastest tag to 3.6 --- ports/colmap/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index dca822db41d65a..710dc505689140 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -1,10 +1,10 @@ -set(COLMAP_REF "3.6-dev.3") +set(COLMAP_REF "3.6") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO colmap/colmap REF ${COLMAP_REF} - SHA512 7eec27fced20f43547e67e9824d33c8412b17c2c80d29d8346d583cef3f7598b59c7c10a0556b857e31106c9312aace54c5dee65b8465974930f35b58331304a + SHA512 9a4b4f2a49891ce8ac32ab1f2e9b859336326bada889e6de49c017a069884bb6c8ab8a2ae430d955e58fc22377c63e8fba9ce80ff959713e2878e29814d44632 HEAD_REF dev ) From 07e645211203718f3eba1ce38b287e0efc4c3248 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Sat, 25 Jul 2020 00:21:16 +0200 Subject: [PATCH 14/18] Updating to 3.6 --- ports/colmap/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/colmap/vcpkg.json b/ports/colmap/vcpkg.json index 0c99b0dbd7c752..4fe5f731cb90e0 100644 --- a/ports/colmap/vcpkg.json +++ b/ports/colmap/vcpkg.json @@ -1,6 +1,6 @@ { "name": "colmap", - "version-string": "3.6-dev.3", + "version-string": "3.6", "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.", "license": "BSD-3-Clause", "homepage": "https://colmap.github.io/", From 0551103e88c4632576e22a62eec7ccd130a83c96 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Sat, 25 Jul 2020 00:49:20 +0200 Subject: [PATCH 15/18] Ceres was missing suitesparse/lapack --- ports/colmap/vcpkg.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/colmap/vcpkg.json b/ports/colmap/vcpkg.json index 4fe5f731cb90e0..0b41442a2873a8 100644 --- a/ports/colmap/vcpkg.json +++ b/ports/colmap/vcpkg.json @@ -18,7 +18,13 @@ "gflags", "glew", "qt5-base", - "ceres", + { + "name": "ceres", + "features": [ + "suitesparse", + "lapack" + ] + }, { "name": "cgal", "features": [ From fd922dd4130a9f25ce01b230c6f8e0d069358078 Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Tue, 4 Aug 2020 09:56:19 +0200 Subject: [PATCH 16/18] Update ports/colmap/portfile.cmake (commit suggested by JackBoosY) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> --- ports/colmap/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index 710dc505689140..e1fa76aa1b6b90 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -8,6 +8,10 @@ vcpkg_from_github( HEAD_REF dev ) +if (TRIPLET_SYSTEM_ARCH MATCHES "x86" AND ("cuda" IN_LIST FEATURES OR "cuda-redist" IN_LIST FEATURES)) + message(FATAL_ERROR "Feature cuda and cuda-redist require x64 triplet.") +endif() + # set GIT_COMMIT_ID and GIT_COMMIT_DATE if(DEFINED VCPKG_HEAD_VERSION) set(GIT_COMMIT_ID "${VCPKG_HEAD_VERSION}") From 29832aa0e2b367b386b0fc4b6f6d130b988593f0 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 4 Aug 2020 19:49:03 -0700 Subject: [PATCH 17/18] format manifest --- ports/colmap/vcpkg.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ports/colmap/vcpkg.json b/ports/colmap/vcpkg.json index 0b41442a2873a8..565e945baba8e5 100644 --- a/ports/colmap/vcpkg.json +++ b/ports/colmap/vcpkg.json @@ -2,27 +2,20 @@ "name": "colmap", "version-string": "3.6", "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.", - "license": "BSD-3-Clause", "homepage": "https://colmap.github.io/", + "license": "BSD-3-Clause", "dependencies": [ - "boost-program-options", "boost-filesystem", "boost-graph", + "boost-program-options", "boost-regex", "boost-system", "boost-test", - "eigen3", - "suitesparse", - "freeimage", - "glog", - "gflags", - "glew", - "qt5-base", { "name": "ceres", "features": [ - "suitesparse", - "lapack" + "lapack", + "suitesparse" ] }, { @@ -30,22 +23,29 @@ "features": [ "qt" ] - } + }, + "eigen3", + "freeimage", + "gflags", + "glew", + "glog", + "qt5-base", + "suitesparse" ], "features": [ { "name": "cuda", + "description": "CUDA support for current compute architecture of this machine.", "dependencies": [ "cuda" - ], - "description": "CUDA support for current compute architecture of this machine." + ] }, { "name": "cuda-redist", + "description": "Redistributable CUDA support for common supported compute architectures.", "dependencies": [ "cuda" - ], - "description": "Redistributable CUDA support for common supported compute architectures." + ] }, { "name": "tests", From 53f5df37e9de173625df2e973295f68297d4979e Mon Sep 17 00:00:00 2001 From: Pablo Speciale Date: Thu, 6 Aug 2020 09:06:40 +0200 Subject: [PATCH 18/18] Update ports/colmap/portfile.cmake Co-authored-by: nicole mazzuca --- ports/colmap/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake index e1fa76aa1b6b90..6b9bf3284c4af2 100644 --- a/ports/colmap/portfile.cmake +++ b/ports/colmap/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( HEAD_REF dev ) -if (TRIPLET_SYSTEM_ARCH MATCHES "x86" AND ("cuda" IN_LIST FEATURES OR "cuda-redist" IN_LIST FEATURES)) +if (NOT TRIPLET_SYSTEM_ARCH STREQUAL "x64" AND ("cuda" IN_LIST FEATURES OR "cuda-redist" IN_LIST FEATURES)) message(FATAL_ERROR "Feature cuda and cuda-redist require x64 triplet.") endif()