CMakeLists.txt 817 B

1234567891011121314151617
  1. # Build/install CppUnitLite
  2. file(GLOB cppunitlite_headers "*.h")
  3. file(GLOB cppunitlite_src "*.cpp")
  4. add_library(CppUnitLite STATIC ${cppunitlite_src} ${cppunitlite_headers})
  5. list(APPEND GTSAM_EXPORTED_TARGETS CppUnitLite)
  6. set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE)
  7. target_link_libraries(CppUnitLite PUBLIC Boost::boost) # boost/lexical_cast.h
  8. gtsam_assign_source_folders("${cppunitlite_headers};${cppunitlite_src}") # MSVC project structure
  9. option(GTSAM_INSTALL_CPPUNITLITE "Enable/Disable installation of CppUnitLite library" ON)
  10. if (GTSAM_INSTALL_CPPUNITLITE)
  11. install(FILES ${cppunitlite_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/CppUnitLite)
  12. install(TARGETS CppUnitLite EXPORT GTSAM-exports ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
  13. endif(GTSAM_INSTALL_CPPUNITLITE)