diff --git a/clover/CMakeLists.txt b/clover/CMakeLists.txt index 7eca3f4c1..f1bdb819f 100644 --- a/clover/CMakeLists.txt +++ b/clover/CMakeLists.txt @@ -30,6 +30,8 @@ find_package(catkin REQUIRED COMPONENTS list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +# https://github.com/mavlink/mavros/blob/7f1a8/mavros/CMakeLists.txt#L42 +set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};/usr/share/cmake/geographiclib") find_package(GeographicLib REQUIRED) # Workaround for OpenCV 3/4 support diff --git a/clover/cmake/FindGeographicLib.cmake b/clover/cmake/FindGeographicLib.cmake deleted file mode 100644 index 9b29c3201..000000000 --- a/clover/cmake/FindGeographicLib.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# taken from: https://github.com/mavlink/mavros/blob/master/libmavconn/cmake/Modules/FindGeographicLib.cmake - -# Look for GeographicLib -# -# Set -# GEOGRAPHICLIB_FOUND = TRUE -# GeographicLib_INCLUDE_DIRS = /usr/local/include -# GeographicLib_LIBRARIES = /usr/local/lib/libGeographic.so -# GeographicLib_LIBRARY_DIRS = /usr/local/lib - -find_path (GeographicLib_INCLUDE_DIRS NAMES GeographicLib/Config.h) - -find_library (GeographicLib_LIBRARIES NAMES Geographic) - -include (FindPackageHandleStandardArgs) -find_package_handle_standard_args (GeographicLib DEFAULT_MSG - GeographicLib_LIBRARIES GeographicLib_INCLUDE_DIRS) -mark_as_advanced (GeographicLib_LIBRARIES GeographicLib_INCLUDE_DIRS)