-
Notifications
You must be signed in to change notification settings - Fork 17
/
CMakeLists.txt
47 lines (38 loc) · 1.38 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
cmake_minimum_required(VERSION 2.8)
project(opencv_candidate)
find_package(catkin REQUIRED)
find_package(libg2o QUIET)
find_package(OpenCV)
find_library(DEPTH_SENSE_LIBRARIES DepthSense /opt/DepthSenseSDK/lib)
if (${DEPTH_SENSE_LIBRARIES} STREQUAL DEPTH_SENSE_LIBRARIES-NOTFOUND)
set(OPENCV_CREATIVE "")
else()
set(OPENCV_CREATIVE opencv_creative)
endif()
if (libg2o_FOUND)
set(EXTRA_DEPENDS libg2o)
set(EXTRA_LIBRARIES opencv_candidate_reconst3d)
endif()
if(OpenCV_VERSION VERSION_LESS "3.0")
set(RGB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/rgbd/include)
endif()
catkin_package(DEPENDS OpenCV ${EXTRA_DEPENDS}
INCLUDE_DIRS include ${RGB_INCLUDE_DIRS}
LIBRARIES opencv_candidate
${OPENCV_CREATIVE}
opencv_rgbd
${opencv_candidate_reconst3d}
)
find_package(OpenCV REQUIRED core imgproc highgui calib3d)
message(STATUS "OpenCV version: ${OpenCV_VERSION}")
message(STATUS "OpenCV headers: ${OpenCV_INCLUDE_DIRS}")
include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS})
include_directories(include)
# install the include directory
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/rgbd/include)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/opencv_candidate
DESTINATION include
COMPONENT main
)
add_subdirectory(src)