blob: 0c9c43ad8e577664618cde078e1b6a86b7e1cb2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a33326e..5eefb80 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,9 +34,12 @@ find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED)
find_package(yaml_cpp_vendor REQUIRED)
-# Geographiclib installs FindGeographicLib.cmake to this non-standard location
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/share/cmake/geographiclib/")
-find_package(GeographicLib REQUIRED)
+find_package(GeographicLib CONFIG QUIET)
+if(NOT GeographicLib_FOUND)
+ # GeographicLib may also be provided via a Find module on some distributions.
+ list(APPEND CMAKE_MODULE_PATH "/usr/share/cmake/geographiclib/")
+ find_package(GeographicLib REQUIRED)
+endif()
set(library_name rl_lib)
|