-
Notifications
You must be signed in to change notification settings - Fork 193
/
CMakeLists.txt
128 lines (115 loc) · 2.9 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
cmake_minimum_required(VERSION 3.0.2)
project(velo2cam_calibration)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -w ")
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
cv_bridge
image_geometry
image_transport
message_filters
roscpp
pcl_ros
sensor_msgs
std_msgs
stereo_msgs
tf
tf_conversions
dynamic_reconfigure
cmake_modules
)
find_package(TinyXML REQUIRED)
find_package(OpenCV REQUIRED)
generate_dynamic_reconfigure_options(
cfg/Lidar.cfg
cfg/Stereo.cfg
cfg/Monocular.cfg
cfg/Plane.cfg
)
################################################
## Declare ROS messages, services and actions ##
################################################
## Generate messages in the 'msg' folder
add_message_files(
FILES
ClusterCentroids.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
)
###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
DEPENDS TinyXML
)
###########
## Build ##
###########
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_LIBRARIES}
${TinyXML_INCLUDE_DIRS}
)
#link_directories()
#add_definitions()
## Declare cpp executables
add_executable(lidar_pattern src/lidar_pattern.cpp)
add_executable(stereo_pattern src/stereo_pattern.cpp)
add_executable(mono_qr_pattern src/mono_qr_pattern.cpp)
add_executable(velo2cam_calibration src/velo2cam_calibration.cpp)
add_executable(v2c_plane_segmentation src/plane.cpp)
add_executable(v2c_disp_masker src/disp_masker.cpp)
## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
add_dependencies(lidar_pattern
${catkin_EXPORTED_TARGETS}
velo2cam_calibration_generate_messages_cpp
${PROJECT_NAME}_gencfg
)
add_dependencies(stereo_pattern
${catkin_EXPORTED_TARGETS}
velo2cam_calibration_generate_messages_cpp
${PROJECT_NAME}_gencfg
)
add_dependencies(mono_qr_pattern
${catkin_EXPORTED_TARGETS}
velo2cam_calibration_generate_messages_cpp
${PROJECT_NAME}_gencfg
)
add_dependencies(
velo2cam_calibration
${catkin_EXPORTED_TARGETS}
velo2cam_calibration_generate_messages_cpp
${PROJECT_NAME}_gencfg
)
add_dependencies(v2c_plane_segmentation ${PROJECT_NAME}_gencfg)
## Specify libraries to link a library or executable target against
target_link_libraries(stereo_pattern
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
target_link_libraries(lidar_pattern
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
target_link_libraries(mono_qr_pattern
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
target_link_libraries(velo2cam_calibration
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${TinyXML_LIBRARIES}
)
target_link_libraries(v2c_plane_segmentation
${catkin_LIBRARIES}
)
target_link_libraries(v2c_disp_masker
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)