forked from LinHuican/stereo_dso_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (52 loc) · 1.62 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
60
61
62
63
64
cmake_minimum_required(VERSION 2.4.6)
project(stereo_dso_ros)
#set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_module) # added by huicanlin
set(OpenCV_DIR "/home/huicanlin/Downloads/software/opencv-3.2.0/local/share/OpenCV/")
find_package(OpenCV REQUIRED)
message("\n\n---- FOUND OpenCV Headers at\n\"${OpenCV_INCLUDE_DIRS}\"")
message("---- FOUND OpenCV Libs at\n\"${OpenCV_LIBS}\"")
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
roscpp
sensor_msgs
cv_bridge
message_filters
)
set(STEREO_DSO_PATH /home/huicanlin/src/stereo_dso)
message("\n\n---- LOOKING FOR STEREO_DSO at\n\"${STEREO_DSO_PATH}\"")
find_package(Pangolin 0.2 REQUIRED)
message("\n\n---- FOUND Pangolin Headers at\n\"${Pangolin_INCLUDE_DIRS}\"")
message("---- FOUND Pangolin Libs at\n\"${Pangolin_LIBRARIES}\"")
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_module)
find_package(Eigen3 REQUIRED)
find_package(Boost COMPONENTS system thread)
find_library(STEREO_DSO_LIBRARY dso ${STEREO_DSO_PATH}/build/lib)
catkin_package(
CATKIN_DEPENDS
geometry_msgs
roscpp
sensor_msgs
cv_bridge
message_filters
)
###########
## Build ##
###########
set(CMAKE_CXX_FLAGS
"${SSE_FLAGS} -O2 -g -std=c++0x -march=native -fno-omit-frame-pointer"
)
include_directories(
${PROJECT_SOURCE_DIR}/src
${STEREO_DSO_PATH}/src
${STEREO_DSO_PATH}/thirdparty/Sophus
${Pangolin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${catkin_INCLUDE_DIRS}
)
## Declare a C++ executable
add_executable(stero_dso_ros src/stereo_dso_ros.cpp)
target_link_libraries(stero_dso_ros
${STEREO_DSO_LIBRARY}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
${catkin_LIBRARIES})