blob: 6b05bb2a8160283c6c952592f622f5e474a6ef88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
--- a/microstrain_inertial_driver/CMakeLists.txt
+++ b/microstrain_inertial_driver/CMakeLists.txt
@@ -133,9 +133,12 @@
###########
# Find some less ROS-y packages
-list(APPEND CMAKE_MODULE_PATH "/usr/share/cmake/geographiclib/")
+find_package(GeographicLib CONFIG QUIET)
+if(NOT GeographicLib_FOUND)
+ list(APPEND CMAKE_MODULE_PATH "/usr/share/cmake/geographiclib/")
+ find_package(GeographicLib REQUIRED)
+endif()
find_package(Eigen3 REQUIRED)
-find_package(GeographicLib REQUIRED)
# We want to use the static library for libgeographic, but it doesn't seem to find it for us, so substitute it here
string(REGEX REPLACE "[.]so[^\\/\\s]*$" ".a" GeographicLib_LIBRARIES ${GeographicLib_LIBRARIES})
|