-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathuse_catkinized_metis.patch
35 lines (31 loc) · 1.16 KB
/
use_catkinized_metis.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77434d135..ac37fd24b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -294,10 +294,12 @@ endif()
include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIR})
if(GTSAM_SUPPORT_NESTED_DISSECTION)
- set(METIS_INCLUDE_DIRECTORIES
- gtsam/3rdparty/metis/include
- gtsam/3rdparty/metis/libmetis
- gtsam/3rdparty/metis/GKlib)
+ find_package(metis_catkin REQUIRED)
+ set(METIS_INCLUDE_DIRECTORIES ${metis_catkin_INCLUDE_DIRS})
+ set(METIS_LIBRARIES ${metis_catkin_LIBRARIES})
+ message("metis catkin libs: ${metis_catkin_LIBRARIES}")
+ add_library(metis SHARED IMPORTED)
+ set_property(TARGET metis PROPERTY IMPORTED_LOCATION ${metis_catkin_LIBRARIES})
else()
set(METIS_INCLUDE_DIRECTORIES)
endif()
diff --git a/gtsam/3rdparty/CMakeLists.txt b/gtsam/3rdparty/CMakeLists.txt
index b890bc4af..d5def0bb3 100644
--- a/gtsam/3rdparty/CMakeLists.txt
+++ b/gtsam/3rdparty/CMakeLists.txt
@@ -43,9 +43,6 @@ if(NOT GTSAM_USE_SYSTEM_EIGEN)
endif()
option(GTSAM_BUILD_METIS_EXECUTABLES "Build metis library executables" OFF)
-if(GTSAM_SUPPORT_NESTED_DISSECTION)
- add_subdirectory(metis)
-endif()
add_subdirectory(ceres)