forked from KumarRobotics/flea3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
94 lines (75 loc) · 2.56 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
cmake_minimum_required(VERSION 2.8.3)
project(flea3)
find_package(catkin REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
find_package(catkin REQUIRED COMPONENTS
roscpp nodelet camera_base message_generation std_msgs
)
find_package(FlyCapture2 REQUIRED)
# Dynamic reconfigure
generate_dynamic_reconfigure_options(cfg/Flea3Dyn.cfg)
# Message
#add_message_files(DIRECTORY msg
# FILES ImageMetadata.msg
# )
#generate_messages(DEPENDENCIES std_msgs)
catkin_package(
INCLUDE_DIRS include ${FlyCapture2_INCLUDE_DIRS}
LIBRARIES ${PROJECT_NAME} ${FlyCapture2_LIBRARIES}
CATKIN_DEPENDS message_runtime
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${FlyCapture2_INCLUDE_DIRS}
)
add_library(${PROJECT_NAME}
src/flea3_camera.cpp
src/flea3_setting.cpp
src/flea3_ros.cpp
src/single/single_node.cpp
src/stereo/stereo_node.cpp
src/single/single_nodelet.cpp
)
target_link_libraries(
${PROJECT_NAME}
${catkin_LIBRARIES}
${FlyCapture2_LIBRARIES}
)
add_executable(${PROJECT_NAME}_single_node src/single/single_main.cpp)
target_link_libraries(${PROJECT_NAME}_single_node ${PROJECT_NAME})
add_executable(${PROJECT_NAME}_stereo_node src/stereo/stereo_main.cpp)
target_link_libraries(${PROJECT_NAME}_stereo_node ${PROJECT_NAME})
add_executable(${PROJECT_NAME}_list_cameras src/list_cameras.cpp)
target_link_libraries(${PROJECT_NAME}_list_cameras ${PROJECT_NAME})
add_executable(${PROJECT_NAME}_async_trigger src/flycapture/async_trigger.cpp)
target_link_libraries(${PROJECT_NAME}_async_trigger ${PROJECT_NAME})
add_dependencies(${PROJECT_NAME}
${catkin_EXPORTED_TARGETS}
${PROJECT_NAME}_gencfg
${PROJECT_NAME}_gencpp
${${PROJECT_NAME}_EXPORTED_TARGETS}
)
# install(TARGETS flea3_single_node flea3_stereo_node flea3_list_cameras
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN "*.*~" EXCLUDE
# )
# install(DIRECTORY msg/
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/msg
# PATTERN "*.*~" EXCLUDE
# )
# install(DIRECTORY cfg/
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cfg
# PATTERN "*.*~" EXCLUDE
# )
# install(DIRECTORY launch/
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
# PATTERN "*.*~" EXCLUDE
# )