Skip to content
Merged
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
44 changes: 44 additions & 0 deletions ports/colmap/fix-flann.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/cmake/FindDependencies.cmake b/cmake/FindDependencies.cmake
index 9e33c7e..f640c77 100644
--- a/cmake/FindDependencies.cmake
+++ b/cmake/FindDependencies.cmake
@@ -17,7 +17,12 @@ find_package(Eigen3 ${COLMAP_FIND_TYPE})

find_package(FreeImage ${COLMAP_FIND_TYPE})

-find_package(FLANN ${COLMAP_FIND_TYPE})
+find_package(flann CONFIG ${COLMAP_FIND_TYPE})
+if(BUILD_SHARED_LIBS )
+ set(FLANN_LIB flann::flann)
+else()
+ set(FLANN_LIB flann::flann_s)
+endif()
find_package(LZ4 ${COLMAP_FIND_TYPE})

find_package(Metis ${COLMAP_FIND_TYPE})
diff --git a/src/colmap/feature/CMakeLists.txt b/src/colmap/feature/CMakeLists.txt
index c5da882..478ee6d 100644
--- a/src/colmap/feature/CMakeLists.txt
+++ b/src/colmap/feature/CMakeLists.txt
@@ -66,7 +66,7 @@ COLMAP_ADD_LIBRARY(
colmap_sensor
colmap_vlfeat
Eigen3::Eigen
- flann
+ ${FLANN_LIB}
lz4
)
if(GPU_ENABLED)
diff --git a/src/colmap/retrieval/CMakeLists.txt b/src/colmap/retrieval/CMakeLists.txt
index 903a935..93363b3 100644
--- a/src/colmap/retrieval/CMakeLists.txt
+++ b/src/colmap/retrieval/CMakeLists.txt
@@ -43,7 +43,7 @@ COLMAP_ADD_LIBRARY(
PUBLIC_LINK_LIBS
Boost::boost
Eigen3::Eigen
- flann
+ ${FLANN_LIB}
lz4
PRIVATE_LINK_LIBS
colmap_math
1 change: 1 addition & 0 deletions ports/colmap/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_from_github(
HEAD_REF main
PATCHES
no-glu.diff
fix-flann.patch
)

if (NOT TRIPLET_SYSTEM_ARCH STREQUAL "x64" AND ("cuda" IN_LIST FEATURES OR "cuda-redist" IN_LIST FEATURES))
Expand Down
2 changes: 1 addition & 1 deletion 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": 2,
"port-version": 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.",
"homepage": "https://colmap.github.io/",
"license": "BSD-3-Clause",
Expand Down
278 changes: 0 additions & 278 deletions ports/flann/fix-build-error.patch

This file was deleted.

Loading