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

[colmap] Add port for COLMAP 3.6 #12410

Merged
merged 21 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1b71414
[colmap] Add port for COLMAP 3.6-dev.3
pablospe Jul 13, 2020
953b5ad
Fixed some errors in portfile
pablospe Jul 13, 2020
948e6b4
Fixing some errors in portfile. These changes also move the binary (a…
pablospe Jul 14, 2020
d09c1a7
Update ports/colmap/portfile.cmake
pablospe Jul 17, 2020
0d26792
Update ports/colmap/portfile.cmake
pablospe Jul 17, 2020
4eaeb0e
Update ports/colmap/usage
pablospe Jul 17, 2020
fe2b988
First working version, the line `vcpkg_copy_tools(TOOL_NAMES colmap A…
pablospe Jul 17, 2020
206b3ce
Using `vcpkg.json` instead of CONTROL file
pablospe Jul 17, 2020
34dd0bf
Formatting json file:
pablospe Jul 18, 2020
2d40b35
Changes suggested by @ahojnnes (colmap author). Waiting for the 3.7 r…
pablospe Jul 20, 2020
40fff4c
Changes proposed from @ahojnne to handle the internal colmap variable…
pablospe Jul 20, 2020
29ed8c6
Enabling TESTS (changes sent by @ahojnnes)
pablospe Jul 20, 2020
eeb1df7
Updated to lastest tag to 3.6
pablospe Jul 24, 2020
07e6452
Updating to 3.6
pablospe Jul 24, 2020
0551103
Ceres was missing suitesparse/lapack
pablospe Jul 24, 2020
9967191
Merge branch 'master' of https://github.com/microsoft/vcpkg into colmap
Aug 4, 2020
fd922dd
Update ports/colmap/portfile.cmake (commit suggested by JackBoosY)
pablospe Aug 4, 2020
ef6fed5
Merge branch 'colmap' of https://github.com/pablospe/vcpkg into colmap
Aug 4, 2020
28eea7c
Merge branch 'master' of https://github.com/microsoft/vcpkg into colmap
Aug 5, 2020
29832aa
format manifest
Aug 5, 2020
53f5df3
Update ports/colmap/portfile.cmake
pablospe Aug 6, 2020
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
85 changes: 85 additions & 0 deletions ports/colmap/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
set(COLMAP_REF "3.6")

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO colmap/colmap
REF ${COLMAP_REF}
SHA512 9a4b4f2a49891ce8ac32ab1f2e9b859336326bada889e6de49c017a069884bb6c8ab8a2ae430d955e58fc22377c63e8fba9ce80ff959713e2878e29814d44632
HEAD_REF dev
)

# set GIT_COMMIT_ID and GIT_COMMIT_DATE
if(DEFINED VCPKG_HEAD_VERSION)
set(GIT_COMMIT_ID "${VCPKG_HEAD_VERSION}")
else()
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}
-DTESTS_ENABLED=${TESTS_ENABLED}
-DGIT_COMMIT_ID=${GIT_COMMIT_ID}
-DGIT_COMMIT_DATE=${COLMAP_GIT_COMMIT_DATE}
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets()

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
${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_pdbs()

file(INSTALL ${SOURCE_PATH}/COPYING.txt
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
RENAME copyright
)
10 changes: 10 additions & 0 deletions ports/colmap/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
For example, under Windows, execute COLMAP as:

<VCPKG-ROOT>\packages\colmap_<TRIPLET>\tools\colmap\colmap.exe gui
<VCPKG-ROOT>\packages\colmap_<TRIPLET>\tools\colmap\colmap.exe mapper
<VCPKG-ROOT>\packages\colmap_<TRIPLET>\tools\colmap\colmap.exe ...

The package colmap provides CMake integration:

find_package(COLMAP REQUIRED)
target_link_libraries(main ${COLMAP_LIBRARIES})
55 changes: 55 additions & 0 deletions ports/colmap/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"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/",
"dependencies": [
"boost-program-options",
"boost-filesystem",
"boost-graph",
"boost-regex",
"boost-system",
"boost-test",
"eigen3",
"suitesparse",
"freeimage",
"glog",
"gflags",
"glew",
"qt5-base",
{
"name": "ceres",
"features": [
"suitesparse",
"lapack"
]
},
{
"name": "cgal",
"features": [
"qt"
]
}
],
"features": [
{
"name": "cuda",
"dependencies": [
"cuda"
],
"description": "CUDA support for current compute architecture of this machine."
},
{
"name": "cuda-redist",
"dependencies": [
"cuda"
],
"description": "Redistributable CUDA support for common supported compute architectures."
},
{
"name": "tests",
"description": "Enable TESTS."
}
]
}