2011-12-14 10:24:21 +08:00
|
|
|
# Build/install Wrap
|
|
|
|
|
2012-06-06 03:25:31 +08:00
|
|
|
find_package(Boost 1.42 COMPONENTS system filesystem thread REQUIRED)
|
|
|
|
|
2011-12-14 10:24:21 +08:00
|
|
|
# Build the executable itself
|
2011-12-14 10:24:25 +08:00
|
|
|
file(GLOB wrap_srcs "*.cpp")
|
2012-07-03 23:33:16 +08:00
|
|
|
file(GLOB wrap_headers "*.h")
|
2012-06-30 09:43:44 +08:00
|
|
|
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})
|
2011-12-14 10:24:21 +08:00
|
|
|
add_executable(wrap wrap.cpp)
|
2012-05-30 04:03:15 +08:00
|
|
|
target_link_libraries(wrap wrap_lib ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
|
2012-01-31 13:28:03 +08:00
|
|
|
|
|
|
|
# Install wrap binary
|
2012-02-01 03:59:15 +08:00
|
|
|
if (GTSAM_INSTALL_WRAP)
|
2012-04-11 00:47:02 +08:00
|
|
|
install(TARGETS wrap DESTINATION bin)
|
2012-02-01 03:59:15 +08:00
|
|
|
endif(GTSAM_INSTALL_WRAP)
|
2011-12-14 10:24:21 +08:00
|
|
|
|
2012-01-31 13:28:03 +08:00
|
|
|
# Install matlab header
|
2012-04-11 00:47:02 +08:00
|
|
|
install(FILES matlab.h DESTINATION include/wrap)
|
2012-01-31 13:28:03 +08:00
|
|
|
|
|
|
|
# Build tests
|
2012-06-06 01:20:19 +08:00
|
|
|
if (GTSAM_BUILD_TESTS)
|
2012-06-06 03:25:31 +08:00
|
|
|
set(wrap_local_libs wrap_lib ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
|
2012-03-30 02:57:31 +08:00
|
|
|
gtsam_add_subdir_tests("wrap" "${wrap_local_libs}" "${wrap_local_libs}" "")
|
2012-02-01 03:59:15 +08:00
|
|
|
endif(GTSAM_BUILD_TESTS)
|
2012-01-31 13:28:05 +08:00
|
|
|
|
|
|
|
|