gtsam/wrap/CMakeLists.txt

29 lines
905 B
CMake
Raw Normal View History

# Build/install Wrap
find_package(Boost 1.42 COMPONENTS system filesystem thread REQUIRED)
# Build the executable itself
file(GLOB wrap_srcs "*.cpp")
2012-07-03 23:33:16 +08:00
file(GLOB wrap_headers "*.h")
list(REMOVE_ITEM wrap_srcs ${CMAKE_CURRENT_SOURCE_DIR}/wrap.cpp)
2012-07-03 23:33:16 +08:00
add_library(wrap_lib STATIC ${wrap_srcs} ${wrap_headers})
gtsam_assign_source_folders(${wrap_srcs} ${wrap_headers})
add_executable(wrap wrap.cpp)
target_link_libraries(wrap wrap_lib ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
2012-01-31 13:28:03 +08:00
# Install wrap binary
if (GTSAM_INSTALL_WRAP)
install(TARGETS wrap DESTINATION bin)
endif(GTSAM_INSTALL_WRAP)
2012-01-31 13:28:03 +08:00
# Install matlab header
install(FILES matlab.h DESTINATION include/wrap)
2012-01-31 13:28:03 +08:00
# Build tests
if (GTSAM_BUILD_TESTS)
set(wrap_local_libs wrap_lib ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
gtsam_add_subdir_tests("wrap" "${wrap_local_libs}" "${wrap_local_libs}" "")
endif(GTSAM_BUILD_TESTS)
2012-01-31 13:28:05 +08:00