Fix system-installed GeographicLib detection and run tests.

release/4.3a0
cbeall3 2015-05-24 19:15:37 -04:00
parent f3bb4434ab
commit 4015fba225
2 changed files with 5 additions and 10 deletions

View File

@ -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})

View File

@ -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 )
#if(MSVC)
# list(APPEND test_link_libraries GeographicLib_STATIC)
#else()
list(APPEND test_link_libraries ${GeographicLib_LIBRARIES}) 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)