aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/gtsam/build-fixes.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/gtsam/build-fixes.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/gtsam/build-fixes.patch')
-rw-r--r--vcpkg/ports/gtsam/build-fixes.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/vcpkg/ports/gtsam/build-fixes.patch b/vcpkg/ports/gtsam/build-fixes.patch
new file mode 100644
index 0000000..70d9a32
--- /dev/null
+++ b/vcpkg/ports/gtsam/build-fixes.patch
@@ -0,0 +1,73 @@
+diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
+index cc2a7df8f..e11de1815 100644
+--- a/cmake/Config.cmake.in
++++ b/cmake/Config.cmake.in
+@@ -25,6 +25,14 @@ if(@GTSAM_USE_SYSTEM_EIGEN@)
+ find_dependency(Eigen3 REQUIRED)
+ endif()
+
++if(@GTSAM_USE_SYSTEM_METIS@)
++find_dependency(metis REQUIRED)
++endif()
++
++if(@GTSAM_USE_TBB@)
++find_dependency(TBB REQUIRED)
++endif()
++
+ # Load exports
+ include(${OUR_CMAKE_DIR}/@PACKAGE_NAME@-exports.cmake)
+
+diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake
+index 0ecd4ca0e..725589a2d 100644
+--- a/cmake/FindTBB.cmake
++++ b/cmake/FindTBB.cmake
+@@ -1,3 +1,4 @@
++if(0)
+ # The MIT License (MIT)
+ #
+ # Copyright (c) 2015 Justus Calvin
+@@ -321,3 +322,4 @@ if(NOT TBB_FOUND)
+ unset(TBB_DEFAULT_SEARCH_DIR)
+
+ endif()
++endif()
+\ No newline at end of file
+diff --git a/cmake/HandleMetis.cmake b/cmake/HandleMetis.cmake
+index 5cbec4ff5..10dbb53de 100644
+--- a/cmake/HandleMetis.cmake
++++ b/cmake/HandleMetis.cmake
+@@ -13,10 +13,9 @@ option(GTSAM_USE_SYSTEM_METIS "Find and use system-installed libmetis. If 'off',
+ if(GTSAM_USE_SYSTEM_METIS)
+ # Debian package: libmetis-dev
+
+- find_path(METIS_INCLUDE_DIR metis.h REQUIRED)
+- find_library(METIS_LIBRARY metis REQUIRED)
++ find_package(metis CONFIG REQUIRED)
+
+- if(METIS_INCLUDE_DIR AND METIS_LIBRARY)
++ if(metis_FOUND)
+ mark_as_advanced(METIS_INCLUDE_DIR)
+ mark_as_advanced(METIS_LIBRARY)
+
+@@ -27,7 +26,7 @@ if(GTSAM_USE_SYSTEM_METIS)
+ $<BUILD_INTERFACE:${GTSAM_SOURCE_DIR}/gtsam/3rdparty/metis/libmetis>
+ $<BUILD_INTERFACE:${GTSAM_SOURCE_DIR}/gtsam/3rdparty/metis/GKlib>
+ )
+- target_link_libraries(metis-gtsam-if INTERFACE ${METIS_LIBRARY})
++ target_link_libraries(metis-gtsam-if INTERFACE ${METIS_LIBRARY} metis)
+ endif()
+ else()
+ # Bundled version:
+diff --git a/cmake/HandleTBB.cmake b/cmake/HandleTBB.cmake
+index fb944ba5b..393aeb345 100644
+--- a/cmake/HandleTBB.cmake
++++ b/cmake/HandleTBB.cmake
+@@ -14,7 +14,7 @@ if (GTSAM_WITH_TBB)
+ endif()
+ # all definitions and link requisites will go via imported targets:
+ # tbb & tbbmalloc
+- list(APPEND GTSAM_ADDITIONAL_LIBRARIES tbb tbbmalloc)
++ list(APPEND GTSAM_ADDITIONAL_LIBRARIES TBB::tbb TBB::tbbmalloc)
+ else()
+ set(GTSAM_USE_TBB 0) # This will go into config.h
+ endif()