-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
66 lines (53 loc) · 1.65 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
65
66
cmake_minimum_required(VERSION 3.0.2)
project(zed_open_capture_ros)
## Compile as C++11
add_compile_options(-std=c++11)
cmake_policy(SET CMP0054 NEW)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
image_transport
cv_bridge
std_msgs
)
# add cmake to find hidapi
list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake")
## Find OpenCV
find_package(OpenCV REQUIRED)
find_package(HIDAPI REQUIRED)
# message(STATUS "libhidapi: include dir at ${HIDAPI_INCLUDE_DIRS}")
# message(STATUS "libhidapi: libraries at ${HIDAPI_LIBRARIES}")
# include_directories()
# find_package(zed_open_capture REQUIRED)
# message(STATUS "ZED Open Capture version: ${zed_open_capture_VERSION}")
## Include directories
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
"/usr/local/include/zed-open-capture"
${HIDAPI_INCLUDE_DIRS}
)
link_directories(zed_open_capture "/usr/local/lib")
## Declare catkin package
catkin_package(
CATKIN_DEPENDS roscpp sensor_msgs image_transport cv_bridge std_msgs
)
## Add executable
add_executable(stereo_node src/stereo_node.cpp)
add_executable(stereo_imu_node src/stereo_imu_node.cpp)
set_target_properties(stereo_node PROPERTIES PREFIX "")
set_target_properties(stereo_imu_node PROPERTIES PREFIX "")
target_compile_definitions(stereo_node PUBLIC VIDEO_MOD_AVAILABLE)
target_compile_definitions(stereo_imu_node PUBLIC VIDEO_MOD_AVAILABLE SENSORS_MOD_AVAILABLE)
# Link libraries
target_link_libraries(stereo_node
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
zed_open_capture
)
target_link_libraries(stereo_imu_node
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
zed_open_capture
)