-
Notifications
You must be signed in to change notification settings - Fork 96
/
CMakeLists.txt
41 lines (29 loc) · 1.08 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 2.6)
enable_testing()
project(gtsamexamples CXX C)
# option: whether turn on Matlab toolbox
option(EXAMPLES_BUILD_MATLAB_TOOLBOX "whether build matlab toolbox" OFF)
# Find GTSAM components
find_package(GTSAM REQUIRED) # Uses installed package
include_directories(${GTSAM_INCLUDE_DIR})
set(GTSAM_LIBRARIES gtsam) # TODO: automatic search libs
find_package(GTSAMCMakeTools)
include(GtsamMakeConfigFile)
include(GtsamBuildTypes)
include(GtsamTesting)
# for unittest scripts
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${GTSAM_DIR}/../GTSAMCMakeTools")
# Boost - same requirement as gtsam
find_package(Boost 1.50 REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
# Process source subdirs
add_subdirectory(cpp)
# Wrapping to MATLAB
if(EXAMPLES_BUILD_MATLAB_TOOLBOX)
# wrap
include(GtsamMatlabWrap)
wrap_and_install_library(gtsamexamples.h ${PROJECT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}" "")
endif()
# Install config and export files
#GtsamMakeConfigFile(gtsamexamples)
#export(TARGETS ${gtsamexamples_EXPORTED_TARGETS} FILE gtsamexamples-exports.cmake)