forked from z619850002/OECS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
58 lines (40 loc) · 1.18 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
cmake_minimum_required(VERSION 3.2)
project(dynamic_adjustment)
#Set the CMake Module path
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules )
#Release mode is light and faster.
set( CMAKE_CXX_COMPILER "g++" )
set( CMAKE_BUILD_TYPE "Release" )
set( CMAKE_CXX_FLAGS "-std=c++11 -march=native -O3" )
#The output path of executable files and link libraries.
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#Dependencies.
#Eigen
INCLUDE_DIRECTORIES("/usr/include/eigen3")
#Opencv
FIND_PACKAGE( OpenCV REQUIRED )
INCLUDE_DIRECTORIES( ${OpenCV_DIRS} )
#Sophus
FIND_PACKAGE( Sophus REQUIRED )
INCLUDE_DIRECTORIES( ${Sophus_INCLUDE_DIRS} )
# G2O
FIND_PACKAGE( G2O REQUIRED )
INCLUDE_DIRECTORIES( ${G2O_INCLUDE_DIRS} )
#SuiteSparse
FIND_PACKAGE(SuiteSparse)
include_directories(${SUITESPARSE_INCLUDE_DIRS})
#Link with third party libs.
set( THIRD_PARTY_LIBS
${OpenCV_LIBS}
${Sophus_LIBRARIES}
g2o_core g2o_stuff g2o_types_sba
)
#The path deposit the header files.
INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}/include
)
#Source directory.
ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( test )
ADD_SUBDIRECTORY( main )