Skip to content

Commit 3784b58

Browse files
authored
Fix compilation issues on MacOS (#196)
1 parent 01060b4 commit 3784b58

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

cmake/FindDependencies.cmake

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@ message(STATUS "Configuring COLMAP...")
4747
set(UNINSTALL_ENABLED OFF CACHE INTERNAL "")
4848
if (FETCH_COLMAP)
4949
FetchContent_MakeAvailable(COLMAP)
50+
51+
# Define where to store the patch
52+
set(COLMAP_PATCH_PATH ${CMAKE_BINARY_DIR}/fix_poisson.patch)
53+
54+
# Download the patch from GitHub
55+
file(DOWNLOAD
56+
https://github.com/colmap/colmap/commit/a586e7cb223cc86c609105246ecd3a10e0c55131.patch
57+
${COLMAP_PATCH_PATH}
58+
SHOW_PROGRESS
59+
STATUS PATCH_DOWNLOAD_STATUS
60+
)
61+
# Apply the patch
62+
execute_process(
63+
COMMAND git apply ${COLMAP_PATCH_PATH}
64+
WORKING_DIRECTORY ${colmap_SOURCE_DIR}
65+
RESULT_VARIABLE PATCH_RESULT
66+
)
5067
else()
5168
find_package(COLMAP REQUIRED)
5269
endif()

0 commit comments

Comments
 (0)