-
Notifications
You must be signed in to change notification settings - Fork 210
/
Copy pathCMakeLists.txt
56 lines (42 loc) · 1.6 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
cmake_minimum_required(VERSION 2.4.6)
project(dso_ros)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
set(ROS_BUILD_TYPE Release)
rosbuild_init()
set(EXECUTABLE_OUTPUT_PATH bin)
set(DSO_PATH $ENV{DSO_PATH})
message("\n\n---- LOOKING FOR DSO at\n\"${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}\"")
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(Eigen3 REQUIRED)
find_package(Boost COMPONENTS system thread)
find_library(DSO_LIBRARY dso ${DSO_PATH}/build/lib)
# SSE flags
rosbuild_check_for_sse()
set(CMAKE_CXX_FLAGS
"${SSE_FLAGS} -O2 -g -std=c++0x -march=native -fno-omit-frame-pointer"
)
set(SOURCE_FILES
src/main.cpp
)
include_directories(
${PROJECT_SOURCE_DIR}/src
${DSO_PATH}/src
${DSO_PATH}/thirdparty/Sophus
${OpenCV_INCLUDE_DIRS}
${Pangolin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
)
rosbuild_add_executable(dso_live src/main.cpp ${SOURCE_FILES})
target_link_libraries(dso_live ${DSO_LIBRARY} ${Pangolin_LIBRARIES} ${OpenCV_LIBS})
rosbuild_link_boost(dso_live thread)