-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
59 lines (45 loc) · 1.51 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required( VERSION 2.8 )
project( pose_graph )
set( CMAKE_BUILD_TYPE "Release" )
set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules )
# Eigen
include_directories( "/usr/include/eigen3" )
# sophus
find_package( Sophus REQUIRED )
include_directories( ${Sophus_INCLUDE_DIRS} )
# g2o
find_package( G2O REQUIRED )
include_directories( ${G2O_INCLUDE_DIRS} )
find_package( Cholmod REQUIRED )
include_directories( ${CHOLMOD_INCLUDE_DIR} )
# gtsam
find_package( GTSAMCMakeTools )
find_package( GTSAM REQUIRED )
include_directories( ${GTSAM_INCLUDE_DIR} )
# Ceres
set(Ceres_DIR /usr/local/ceres-solver/lib/cmake/Ceres)
find_package( Ceres REQUIRED )
include_directories( ${CERES_INCLUDE_DIRS} )
add_executable( pose_graph_g2o_SE3 pose_graph_g2o_SE3.cpp )
target_link_libraries( pose_graph_g2o_SE3
g2o_core g2o_stuff g2o_types_slam3d ${CHOLMOD_LIBRARIES}
)
add_executable( pose_graph_g2o_lie pose_graph_g2o_lie_algebra.cpp )
target_link_libraries( pose_graph_g2o_lie
g2o_core g2o_stuff
${CHOLMOD_LIBRARIES}
${Sophus_LIBRARIES}
)
add_executable( pose_graph_gtsam pose_graph_gtsam.cpp )
target_link_libraries( pose_graph_gtsam
${CHOLMOD_LIBRARIES} gtsam
)
add_executable( pose_graph_gtsam_isam pose_graph_gtsam_test.cpp )
target_link_libraries( pose_graph_gtsam_isam
${CHOLMOD_LIBRARIES} gtsam
)
add_executable( pose_graph_ceres ceres_SE3.cpp )
target_link_libraries( pose_graph_ceres
${CHOLMOD_LIBRARIES} ${CERES_LIBRARIES} ${Sophus_LIBRARIES}
)