Fix system-installed GeographicLib detection and run tests.
parent
f3bb4434ab
commit
4015fba225
|
|
@ -58,10 +58,10 @@ add_subdirectory(ceres)
|
||||||
include(GeographicLib/cmake/FindGeographicLib.cmake)
|
include(GeographicLib/cmake/FindGeographicLib.cmake)
|
||||||
|
|
||||||
# Set up the option to install GeographicLib
|
# Set up the option to install GeographicLib
|
||||||
if(GEOGRAPHICLIB_FOUND)
|
if(GEOGRAPHICLIB-NOTFOUND)
|
||||||
set(install_geographiclib_default OFF)
|
|
||||||
else()
|
|
||||||
set(install_geographiclib_default ON)
|
set(install_geographiclib_default ON)
|
||||||
|
else()
|
||||||
|
set(install_geographiclib_default OFF)
|
||||||
endif()
|
endif()
|
||||||
option(GTSAM_INSTALL_GEOGRAPHICLIB "Build and install the 3rd-party library GeographicLib" ${install_geographiclib_default})
|
option(GTSAM_INSTALL_GEOGRAPHICLIB "Build and install the 3rd-party library GeographicLib" ${install_geographiclib_default})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,10 @@ if(GTSAM_INSTALL_GEOGRAPHICLIB)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
if(GEOGRAPHICLIB_FOUND)
|
if(GeographicLib_LIBRARIES)
|
||||||
# If we're not installing, but it's already installed, use the installed one
|
# If we're not installing, but it's already installed, use the installed one
|
||||||
include_directories(${GeographicLib_INCLUDE_DIRS})
|
include_directories(${GeographicLib_INCLUDE_DIRS})
|
||||||
list(APPEND test_link_libraries )
|
list(APPEND test_link_libraries ${GeographicLib_LIBRARIES})
|
||||||
#if(MSVC)
|
|
||||||
# list(APPEND test_link_libraries GeographicLib_STATIC)
|
|
||||||
#else()
|
|
||||||
list(APPEND test_link_libraries ${GeographicLib_LIBRARIES})
|
|
||||||
#endif()
|
|
||||||
else()
|
else()
|
||||||
# We don't have GeographicLib
|
# We don't have GeographicLib
|
||||||
set(tests_excluded testGeographicLib.cpp testGPSFactor.cpp testMagFactor.cpp)
|
set(tests_excluded testGeographicLib.cpp testGPSFactor.cpp testMagFactor.cpp)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue