-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·30 lines (24 loc) · 936 Bytes
/
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
# CMake 工程,读者应该熟悉了,我就不一一注释了
cmake_minimum_required( VERSION 2.8 )
project( ba_example )
set( CMAKE_BUILD_TYPE Release )
set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -O2 -march=native" )
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules )
find_package( G2O REQUIRED )
find_package( OpenCV REQUIRED )
find_package( Eigen3 REQUIRED )
find_package( Cholmod )
include_directories( ${EIGEN3_INCLUDE_DIR} ${CHOLMOD_INCLUDE_DIR} )
add_executable( ba_example main.cpp )
target_link_libraries( ba_example
${OpenCV_LIBS}
g2o_core g2o_types_slam3d g2o_solver_csparse g2o_stuff g2o_csparse_extension g2o_types_sba
${CHOLMOD_LIBRARIES}
)
add_executable( sba_demo sba_demo.cpp )
target_link_libraries( sba_demo
${OpenCV_LIBS}
g2o_core g2o_types_slam3d g2o_solver_csparse g2o_stuff g2o_csparse_extension g2o_types_sba
g2o_types_icp
${CHOLMOD_LIBRARIES}
)