diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c4f8e230..b7c1e0336 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,7 @@ option(GTSAM_BUILD_EXAMPLES "Enable/Disable building of examples" if(GTSAM_UNSTABLE_AVAILABLE) option(GTSAM_BUILD_UNSTABLE "Enable/Disable libgtsam_unstable" ON) endif() -option(GTSAM_BUILD_SHARED_LIBRARY "Enable/Disable building of a shared version of gtsam" ON) -option(GTSAM_BUILD_STATIC_LIBRARY "Enable/Disable building of a static version of gtsam" OFF) +option(GTSAM_BUILD_STATIC_LIBRARY "Build a static gtsam library, instead of shared" OFF) option(GTSAM_USE_QUATERNIONS "Enable/Disable using an internal Quaternion representation for rotations instead of rotation matrices. If enable, Rot3::EXPMAP is enforced by default." OFF) option(GTSAM_POSE3_EXPMAP "Enable/Disable using Pose3::EXPMAP as the default mode. If disabled, Pose3::FIRST_ORDER will be used." OFF) option(GTSAM_ROT3_EXPMAP "Ignore if GTSAM_USE_QUATERNIONS is OFF (Rot3::EXPMAP by default). Otherwise, enable Rot3::EXPMAP, or if disabled, use Rot3::CAYLEY." OFF) @@ -76,15 +75,14 @@ if(GTSAM_INSTALL_WRAP AND NOT GTSAM_BUILD_WRAP) message(FATAL_ERROR "GTSAM_INSTALL_WRAP is enabled, please also enable GTSAM_BUILD_WRAP") endif() +if(GTSAM_INSTALL_MATLAB_TOOLBOX AND GTSAM_BUILD_STATIC_LIBRARY) + message(FATAL_ERROR "GTSAM_INSTALL_MATLAB_TOOLBOX and GTSAM_BUILD_STATIC_LIBRARY are both enabled. The MATLAB wrapper cannot be compiled with a static GTSAM library because mex modules are themselves shared libraries. If you want a self-contained mex module, enable GTSAM_MEX_BUILD_STATIC_MODULE instead of GTSAM_BUILD_STATIC_LIBRARY.") +endif() + # Flags for choosing default packaging tools set(CPACK_SOURCE_GENERATOR "TGZ" CACHE STRING "CPack Default Source Generator") set(CPACK_GENERATOR "TGZ" CACHE STRING "CPack Default Binary Generator") -# Sanity check building of libraries -if (NOT GTSAM_BUILD_SHARED_LIBRARY AND NOT GTSAM_BUILD_STATIC_LIBRARY) - message(FATAL_ERROR "Both shared and static version of GTSAM library disabled - need to choose at least one!") -endif() - # Flags to determine whether tests and examples are build during 'make install' # Note that these remove the targets from the 'all' option(GTSAM_DISABLE_TESTS_ON_INSTALL "Disables building tests during install" ON) @@ -286,24 +284,11 @@ endif() if(GTSAM_ENABLE_CONSISTENCY_CHECKS) add_definitions(-DGTSAM_EXTRA_CONSISTENCY_CHECKS) -endif() +endif() ############################################################################### # Add components -# Set default library - static or shared, before adding subdirectories -if(GTSAM_BUILD_SHARED_LIBRARY) - set(gtsam-default gtsam-shared) - if(GTSAM_BUILD_UNSTABLE) - set(gtsam_unstable-default gtsam_unstable-shared) - endif() -else() - set(gtsam-default gtsam-static) - if(GTSAM_BUILD_UNSTABLE) - set(gtsam_unstable-default gtsam_unstable-static) - endif() -endif() - # Build CppUnitLite add_subdirectory(CppUnitLite) @@ -381,8 +366,7 @@ print_config_flag(${GTSAM_BUILD_TESTS} "Build Tests if (DOXYGEN_FOUND) print_config_flag(${GTSAM_BUILD_DOCS} "Build Docs ") endif() -print_config_flag(${GTSAM_BUILD_SHARED_LIBRARY} "Build shared GTSAM Library ") -print_config_flag(${GTSAM_BUILD_STATIC_LIBRARY} "Build static GTSAM Library ") +print_config_flag(${GTSAM_BUILD_STATIC_LIBRARY} "Build static GTSAM library instead of shared") print_config_flag(${GTSAM_BUILD_TYPE_POSTFIXES} "Put build type in library name ") if(GTSAM_UNSTABLE_AVAILABLE) print_config_flag(${GTSAM_BUILD_UNSTABLE} "Build libgtsam_unstable ") diff --git a/cmake/GtsamBuildTypes.cmake b/cmake/GtsamBuildTypes.cmake index 1fc259724..f00f3b3b1 100644 --- a/cmake/GtsamBuildTypes.cmake +++ b/cmake/GtsamBuildTypes.cmake @@ -10,11 +10,7 @@ if(NOT FIRST_PASS_DONE AND NOT CMAKE_BUILD_TYPE AND NOT MSVC AND NOT XCODE_VERSI endif() # Add option for using build type postfixes to allow installing multiple build modes -if(MSVC OR XCODE_VERSION) - option(GTSAM_BUILD_TYPE_POSTFIXES "Enable/Disable appending the build type to the name of compiled libraries" ON) -else() - option(GTSAM_BUILD_TYPE_POSTFIXES "Enable/Disable appending the build type to the name of compiled libraries" OFF) -endif() +option(GTSAM_BUILD_TYPE_POSTFIXES "Enable/Disable appending the build type to the name of compiled libraries" ON) # Add debugging flags but only on the first pass if(NOT FIRST_PASS_DONE) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index eae90e298..0d8e3792a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -28,7 +28,7 @@ foreach(example_src ${example_srcs} ) set_target_properties(${example_bin} PROPERTIES EXCLUDE_FROM_ALL ON) endif() - target_link_libraries(${example_bin} ${gtsam-default} ${Boost_PROGRAM_OPTIONS_LIBRARY}) + target_link_libraries(${example_bin} gtsam ${Boost_PROGRAM_OPTIONS_LIBRARY}) if(NOT MSVC) add_custom_target(${example_bin}.run ${EXECUTABLE_OUTPUT_PATH}${example_bin} ${ARGN}) endif() diff --git a/gtsam/CMakeLists.txt b/gtsam/CMakeLists.txt index b739f91c3..946ec5bc6 100644 --- a/gtsam/CMakeLists.txt +++ b/gtsam/CMakeLists.txt @@ -95,42 +95,40 @@ message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") # build shared and static versions of the library if (GTSAM_BUILD_STATIC_LIBRARY) message(STATUS "Building GTSAM - static") - add_library(gtsam-static STATIC ${gtsam_srcs}) - target_link_libraries(gtsam-static ${GTSAM_BOOST_LIBRARIES} ${GTSAM_ADDITIONAL_LIBRARIES}) - set_target_properties(gtsam-static PROPERTIES + add_library(gtsam STATIC ${gtsam_srcs}) + target_link_libraries(gtsam ${GTSAM_BOOST_LIBRARIES} ${GTSAM_ADDITIONAL_LIBRARIES}) + set_target_properties(gtsam PROPERTIES OUTPUT_NAME gtsam CLEAN_DIRECT_OUTPUT 1 VERSION ${gtsam_version} SOVERSION ${gtsam_soversion}) if(WIN32) # Add 'lib' prefix to static library to avoid filename collision with shared library - set_target_properties(gtsam-static PROPERTIES + set_target_properties(gtsam PROPERTIES PREFIX "lib" COMPILE_DEFINITIONS GTSAM_IMPORT_STATIC) endif() - install(TARGETS gtsam-static EXPORT GTSAM-exports ARCHIVE DESTINATION lib) - list(APPEND GTSAM_EXPORTED_TARGETS gtsam-static) + install(TARGETS gtsam EXPORT GTSAM-exports ARCHIVE DESTINATION lib) + list(APPEND GTSAM_EXPORTED_TARGETS gtsam) set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE) -endif () - -if (GTSAM_BUILD_SHARED_LIBRARY) +else() message(STATUS "Building GTSAM - shared") - add_library(gtsam-shared SHARED ${gtsam_srcs}) - target_link_libraries(gtsam-shared ${GTSAM_BOOST_LIBRARIES} ${GTSAM_ADDITIONAL_LIBRARIES}) - set_target_properties(gtsam-shared PROPERTIES + add_library(gtsam SHARED ${gtsam_srcs}) + target_link_libraries(gtsam ${GTSAM_BOOST_LIBRARIES} ${GTSAM_ADDITIONAL_LIBRARIES}) + set_target_properties(gtsam PROPERTIES OUTPUT_NAME gtsam CLEAN_DIRECT_OUTPUT 1 VERSION ${gtsam_version} SOVERSION ${gtsam_soversion}) if(WIN32) - set_target_properties(gtsam-shared PROPERTIES + set_target_properties(gtsam PROPERTIES PREFIX "" DEFINE_SYMBOL GTSAM_EXPORTS RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") endif() - install(TARGETS gtsam-shared EXPORT GTSAM-exports LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) - list(APPEND GTSAM_EXPORTED_TARGETS gtsam-shared) + install(TARGETS gtsam EXPORT GTSAM-exports LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + list(APPEND GTSAM_EXPORTED_TARGETS gtsam) set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE) -endif(GTSAM_BUILD_SHARED_LIBRARY) +endif() # Set dataset paths set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/slam/dataset.cpp" @@ -153,10 +151,10 @@ if (GTSAM_INSTALL_MATLAB_TOOLBOX) # Generate, build and install toolbox set(mexFlags "${GTSAM_BUILD_MEX_BINARY_FLAGS}") - if("${gtsam-default}" STREQUAL "gtsam-static") + if(GTSAM_BUILD_STATIC_LIBRARY) list(APPEND mexFlags -DGTSAM_IMPORT_STATIC) endif() # Wrap - wrap_and_install_library(../gtsam.h "${gtsam-default};${GTSAM_ADDITIONAL_LIBRARIES}" "" "${mexFlags}") + wrap_and_install_library(../gtsam.h "gtsam;${GTSAM_ADDITIONAL_LIBRARIES}" "" "${mexFlags}") endif () diff --git a/gtsam/base/CMakeLists.txt b/gtsam/base/CMakeLists.txt index a039a7481..94e2473ed 100644 --- a/gtsam/base/CMakeLists.txt +++ b/gtsam/base/CMakeLists.txt @@ -13,11 +13,11 @@ set(base_excluded_files # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(base "${gtsam-default}" "${gtsam-default}" "${base_excluded_files}") + gtsam_add_subdir_tests(base "gtsam" "gtsam" "${base_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts if (GTSAM_BUILD_TIMING) - gtsam_add_subdir_timing(base "${gtsam-default}" "${gtsam-default}" "${base_excluded_files}") + gtsam_add_subdir_timing(base "gtsam" "gtsam" "${base_excluded_files}") endif(GTSAM_BUILD_TIMING) diff --git a/gtsam/discrete/CMakeLists.txt b/gtsam/discrete/CMakeLists.txt index 4535868dd..3f1a57e0b 100644 --- a/gtsam/discrete/CMakeLists.txt +++ b/gtsam/discrete/CMakeLists.txt @@ -9,7 +9,7 @@ set (discrete_excluded_tests "") # Add all tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(discrete "${gtsam-default}" "${gtsam-default}" "${discrete_excluded_tests}") + gtsam_add_subdir_tests(discrete "gtsam" "gtsam" "${discrete_excluded_tests}") endif() # Build timing scripts diff --git a/gtsam/geometry/CMakeLists.txt b/gtsam/geometry/CMakeLists.txt index b659d8314..96b84193b 100644 --- a/gtsam/geometry/CMakeLists.txt +++ b/gtsam/geometry/CMakeLists.txt @@ -10,11 +10,11 @@ set(geometry_excluded_files # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(geometry "${gtsam-default}" "${gtsam-default}" "${geometry_excluded_files}") + gtsam_add_subdir_tests(geometry "gtsam" "gtsam" "${geometry_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts if (GTSAM_BUILD_TIMING) - gtsam_add_subdir_timing(geometry "${gtsam-default}" "${gtsam-default}" "${geometry_excluded_files}") + gtsam_add_subdir_timing(geometry "gtsam" "gtsam" "${geometry_excluded_files}") endif(GTSAM_BUILD_TIMING) diff --git a/gtsam/inference/CMakeLists.txt b/gtsam/inference/CMakeLists.txt index 8e63eecf8..d5c994b00 100644 --- a/gtsam/inference/CMakeLists.txt +++ b/gtsam/inference/CMakeLists.txt @@ -10,11 +10,11 @@ set(inference_excluded_files # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(inference "${gtsam-default}" "${gtsam-default}" "${inference_excluded_files}") + gtsam_add_subdir_tests(inference "gtsam" "gtsam" "${inference_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts if (GTSAM_BUILD_TIMING) - gtsam_add_subdir_timing(inference "${gtsam-default}" "${gtsam-default}" "${inference_excluded_files}") + gtsam_add_subdir_timing(inference "gtsam" "gtsam" "${inference_excluded_files}") endif(GTSAM_BUILD_TIMING) diff --git a/gtsam/linear/CMakeLists.txt b/gtsam/linear/CMakeLists.txt index aa1be1127..4a93e2875 100644 --- a/gtsam/linear/CMakeLists.txt +++ b/gtsam/linear/CMakeLists.txt @@ -10,7 +10,7 @@ set(linear_excluded_files # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(linear "${gtsam-default}" "${gtsam-default}" "${linear_excluded_files}") + gtsam_add_subdir_tests(linear "gtsam" "gtsam" "${linear_excluded_files}") endif(GTSAM_BUILD_TESTS) if(MSVC) @@ -20,5 +20,5 @@ endif() # Build timing scripts if (GTSAM_BUILD_TIMING) - gtsam_add_subdir_timing(linear "${gtsam-default}" "${gtsam-default}" "${linear_excluded_files}") + gtsam_add_subdir_timing(linear "gtsam" "gtsam" "${linear_excluded_files}") endif(GTSAM_BUILD_TIMING) diff --git a/gtsam/navigation/CMakeLists.txt b/gtsam/navigation/CMakeLists.txt index f90f25f00..ed599cf15 100644 --- a/gtsam/navigation/CMakeLists.txt +++ b/gtsam/navigation/CMakeLists.txt @@ -7,10 +7,10 @@ set (navigation_excluded_tests "") # Add all tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(navigation "${gtsam-default}" "${gtsam-default}" "${navigation_excluded_tests}") + gtsam_add_subdir_tests(navigation "gtsam" "gtsam" "${navigation_excluded_tests}") endif() # Build timing scripts if (GTSAM_BUILD_TIMING) - gtsam_add_subdir_timing(navigation "${gtsam-default}" "${gtsam-default}" "${navigation_excluded_files}") + gtsam_add_subdir_timing(navigation "gtsam" "gtsam" "${navigation_excluded_files}") endif(GTSAM_BUILD_TIMING) diff --git a/gtsam/nonlinear/CMakeLists.txt b/gtsam/nonlinear/CMakeLists.txt index 3e2fdb689..f4cf0b585 100644 --- a/gtsam/nonlinear/CMakeLists.txt +++ b/gtsam/nonlinear/CMakeLists.txt @@ -10,11 +10,11 @@ set(nonlinear_excluded_files # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(nonlinear "${gtsam-default}" "${gtsam-default}" "${nonlinear_excluded_files}") + gtsam_add_subdir_tests(nonlinear "gtsam" "gtsam" "${nonlinear_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts if (GTSAM_BUILD_TIMING) - gtsam_add_subdir_timing(nonlinear "${gtsam-default}" "${gtsam-default}" "${nonlinear_excluded_files}") + gtsam_add_subdir_timing(nonlinear "gtsam" "gtsam" "${nonlinear_excluded_files}") endif(GTSAM_BUILD_TIMING) diff --git a/gtsam/slam/CMakeLists.txt b/gtsam/slam/CMakeLists.txt index 53860d913..1c20e3720 100644 --- a/gtsam/slam/CMakeLists.txt +++ b/gtsam/slam/CMakeLists.txt @@ -15,10 +15,10 @@ set(slam_excluded_files # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(slam "${gtsam-default}" "${gtsam-default}" "${slam_excluded_files}") + gtsam_add_subdir_tests(slam "gtsam" "gtsam" "${slam_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts if (GTSAM_BUILD_TIMING) - gtsam_add_subdir_timing(slam "${gtsam-default}" "${gtsam-default}" "${slam_excluded_files}") + gtsam_add_subdir_timing(slam "gtsam" "gtsam" "${slam_excluded_files}") endif(GTSAM_BUILD_TIMING) diff --git a/gtsam/symbolic/CMakeLists.txt b/gtsam/symbolic/CMakeLists.txt index 9b92f40c6..a683f0711 100644 --- a/gtsam/symbolic/CMakeLists.txt +++ b/gtsam/symbolic/CMakeLists.txt @@ -10,11 +10,11 @@ set(symbolic_excluded_files # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_subdir_tests(symbolic "${gtsam-default}" "${gtsam-default}" "${symbolic_excluded_files}") + gtsam_add_subdir_tests(symbolic "gtsam" "gtsam" "${symbolic_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts if (GTSAM_BUILD_TIMING) - gtsam_add_subdir_timing(symbolic "${gtsam-default}" "${gtsam-default}" "${symbolic_excluded_files}") + gtsam_add_subdir_timing(symbolic "gtsam" "gtsam" "${symbolic_excluded_files}") endif(GTSAM_BUILD_TIMING) diff --git a/gtsam_unstable/CMakeLists.txt b/gtsam_unstable/CMakeLists.txt index 72b6a97f6..4b7abdaba 100644 --- a/gtsam_unstable/CMakeLists.txt +++ b/gtsam_unstable/CMakeLists.txt @@ -58,40 +58,38 @@ message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") # build shared and static versions of the library if (GTSAM_BUILD_STATIC_LIBRARY) message(STATUS "Building GTSAM_UNSTABLE - static") - add_library(gtsam_unstable-static STATIC ${gtsam_unstable_srcs}) - set_target_properties(gtsam_unstable-static PROPERTIES + add_library(gtsam_unstable STATIC ${gtsam_unstable_srcs}) + set_target_properties(gtsam_unstable PROPERTIES OUTPUT_NAME gtsam_unstable CLEAN_DIRECT_OUTPUT 1 VERSION ${gtsam_unstable_version} SOVERSION ${gtsam_unstable_soversion}) if(WIN32) # Add 'lib' prefix to static library to avoid filename collision with shared library - set_target_properties(gtsam_unstable-static PROPERTIES + set_target_properties(gtsam_unstable PROPERTIES PREFIX "lib" COMPILE_DEFINITIONS GTSAM_UNSTABLE_IMPORT_STATIC) endif() - target_link_libraries(gtsam_unstable-static gtsam-static ${GTSAM_UNSTABLE_BOOST_LIBRARIES}) - install(TARGETS gtsam_unstable-static EXPORT GTSAM-exports ARCHIVE DESTINATION lib) - list(APPEND GTSAM_EXPORTED_TARGETS gtsam_unstable-static) + target_link_libraries(gtsam_unstable gtsam ${GTSAM_UNSTABLE_BOOST_LIBRARIES}) + install(TARGETS gtsam_unstable EXPORT GTSAM-exports ARCHIVE DESTINATION lib) + list(APPEND GTSAM_EXPORTED_TARGETS gtsam_unstable) set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE) -endif() - -if (GTSAM_BUILD_SHARED_LIBRARY) +else() message(STATUS "Building GTSAM_UNSTABLE - shared") - add_library(gtsam_unstable-shared SHARED ${gtsam_unstable_srcs}) - set_target_properties(gtsam_unstable-shared PROPERTIES + add_library(gtsam_unstable SHARED ${gtsam_unstable_srcs}) + set_target_properties(gtsam_unstable PROPERTIES OUTPUT_NAME gtsam_unstable CLEAN_DIRECT_OUTPUT 1 VERSION ${gtsam_unstable_version} SOVERSION ${gtsam_unstable_soversion}) if(WIN32) - set_target_properties(gtsam_unstable-shared PROPERTIES + set_target_properties(gtsam_unstable PROPERTIES PREFIX "" DEFINE_SYMBOL GTSAM_UNSTABLE_EXPORTS RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") endif() - target_link_libraries(gtsam_unstable-shared gtsam-shared ${GTSAM_UNSTABLE_BOOST_LIBRARIES}) - install(TARGETS gtsam_unstable-shared EXPORT GTSAM-exports LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) - list(APPEND GTSAM_EXPORTED_TARGETS gtsam_unstable-shared) + target_link_libraries(gtsam_unstable gtsam ${GTSAM_UNSTABLE_BOOST_LIBRARIES}) + install(TARGETS gtsam_unstable EXPORT GTSAM-exports LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + list(APPEND GTSAM_EXPORTED_TARGETS gtsam_unstable) set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE) endif() @@ -102,12 +100,12 @@ if (GTSAM_INSTALL_MATLAB_TOOLBOX) # Generate, build and install toolbox set(mexFlags "${GTSAM_BUILD_MEX_BINARY_FLAGS}") - if("${gtsam-default}" STREQUAL "gtsam-static") + if(GTSAM_BUILD_STATIC_LIBRARY) list(APPEND mexFlags -DGTSAM_IMPORT_STATIC) endif() # Wrap - wrap_and_install_library(gtsam_unstable.h "${gtsam-default};${gtsam_unstable-default}" "" "${mexFlags}") + wrap_and_install_library(gtsam_unstable.h "gtsam;gtsam_unstable" "" "${mexFlags}") endif(GTSAM_INSTALL_MATLAB_TOOLBOX) diff --git a/gtsam_unstable/base/CMakeLists.txt b/gtsam_unstable/base/CMakeLists.txt index 40337f6a6..22737d533 100644 --- a/gtsam_unstable/base/CMakeLists.txt +++ b/gtsam_unstable/base/CMakeLists.txt @@ -3,8 +3,8 @@ file(GLOB base_headers "*.h") install(FILES ${base_headers} DESTINATION include/gtsam_unstable/base) set (base_full_libs - ${gtsam-default} - ${gtsam_unstable-default}) + gtsam + gtsam_unstable) # Exclude tests that don't work set (base_excluded_tests "") diff --git a/gtsam_unstable/discrete/CMakeLists.txt b/gtsam_unstable/discrete/CMakeLists.txt index c978fcde5..a20c5cdb0 100644 --- a/gtsam_unstable/discrete/CMakeLists.txt +++ b/gtsam_unstable/discrete/CMakeLists.txt @@ -3,8 +3,8 @@ file(GLOB discrete_headers "*.h") install(FILES ${discrete_headers} DESTINATION include/gtsam_unstable/discrete) set (discrete_full_libs - ${gtsam-default} - ${gtsam_unstable-default}) + gtsam + gtsam_unstable) # Exclude tests that don't work #set (discrete_excluded_tests @@ -37,6 +37,6 @@ if (GTSAM_BUILD_EXAMPLES) add_custom_target(${example}.run ${EXECUTABLE_OUTPUT_PATH}${example} ${ARGN}) endif() - target_link_libraries(${example} ${gtsam-default} ${gtsam_unstable-default}) + target_link_libraries(${example} gtsam gtsam_unstable) endforeach(example) endif (GTSAM_BUILD_EXAMPLES) diff --git a/gtsam_unstable/dynamics/CMakeLists.txt b/gtsam_unstable/dynamics/CMakeLists.txt index a05c9ef26..382b2b4cf 100644 --- a/gtsam_unstable/dynamics/CMakeLists.txt +++ b/gtsam_unstable/dynamics/CMakeLists.txt @@ -4,8 +4,8 @@ install(FILES ${dynamics_headers} DESTINATION include/gtsam_unstable/dynamics) # Components to link tests in this subfolder against set (dynamics_full_libs - ${gtsam-default} - ${gtsam_unstable-default}) + gtsam + gtsam_unstable) # Exclude tests that don't work set (dynamics_excluded_tests "") diff --git a/gtsam_unstable/examples/CMakeLists.txt b/gtsam_unstable/examples/CMakeLists.txt index 7af84a784..1eaa09281 100644 --- a/gtsam_unstable/examples/CMakeLists.txt +++ b/gtsam_unstable/examples/CMakeLists.txt @@ -18,7 +18,7 @@ foreach(example_src ${example_srcs} ) set_target_properties(${example_bin} PROPERTIES EXCLUDE_FROM_ALL ON) endif() - target_link_libraries(${example_bin} ${gtsam-default} ${gtsam_unstable-default}) + target_link_libraries(${example_bin} gtsam gtsam_unstable) if(NOT MSVC) add_custom_target(${example_bin}.run ${EXECUTABLE_OUTPUT_PATH}${example_bin} ${ARGN}) endif() diff --git a/gtsam_unstable/geometry/CMakeLists.txt b/gtsam_unstable/geometry/CMakeLists.txt index bea2a51f0..c7ee3902f 100644 --- a/gtsam_unstable/geometry/CMakeLists.txt +++ b/gtsam_unstable/geometry/CMakeLists.txt @@ -4,8 +4,8 @@ install(FILES ${geometry_headers} DESTINATION include/gtsam_unstable/geometry) # Components to link tests in this subfolder against set (geometry_full_libs - ${gtsam-default} - ${gtsam_unstable-default}) + gtsam + gtsam_unstable) # Exclude tests that don't work set (geometry_excluded_tests "") diff --git a/gtsam_unstable/nonlinear/CMakeLists.txt b/gtsam_unstable/nonlinear/CMakeLists.txt index b4f386065..daef8983c 100644 --- a/gtsam_unstable/nonlinear/CMakeLists.txt +++ b/gtsam_unstable/nonlinear/CMakeLists.txt @@ -4,8 +4,8 @@ install(FILES ${nonlinear_headers} DESTINATION include/gtsam_unstable/nonlinear) # Components to link tests in this subfolder against set (nonlinear_full_libs -${gtsam-default} -${gtsam_unstable-default}) +gtsam +gtsam_unstable) # Exclude tests that don't work set (nonlinear_excluded_tests #"") diff --git a/gtsam_unstable/slam/CMakeLists.txt b/gtsam_unstable/slam/CMakeLists.txt index a0229de19..ae4784f70 100644 --- a/gtsam_unstable/slam/CMakeLists.txt +++ b/gtsam_unstable/slam/CMakeLists.txt @@ -9,8 +9,8 @@ install(FILES ${slam_headers} DESTINATION include/gtsam_unstable/slam) # Components to link tests in this subfolder against set (slam_full_libs - ${gtsam-default} - ${gtsam_unstable-default}) + gtsam + gtsam_unstable) # Exclude tests that don't work set (slam_excluded_tests diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index da8387614..a6ae2afca 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,6 @@ # Assemble local libraries set (tests_full_libs - ${gtsam-default} + gtsam CppUnitLite) # exclude certain files