-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCMakeLists.txt
205 lines (154 loc) · 3.62 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
cmake_minimum_required(VERSION 2.8.3)
project(laserscan_to_pointcloud)
##############
## Packages ##
##############
set(${PROJECT_NAME}_CATKIN_COMPONENTS
dynamic_reconfigure
geometry_msgs
nav_msgs
rosconsole
roscpp
sensor_msgs
tf2
tf2_ros
)
find_package(Boost REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(catkin REQUIRED COMPONENTS ${${PROJECT_NAME}_CATKIN_COMPONENTS})
###################################
## catkin specific configuration ##
###################################
generate_dynamic_reconfigure_options(
cfg/LaserScanToPointcloudAssembler.cfg
)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
polar_to_cartesian_matrix_cache
tf_rosmsg_eigen_conversions
tf_collector
laserscan_to_pointcloud
CATKIN_DEPENDS
${${PROJECT_NAME}_CATKIN_COMPONENTS}
DEPENDS
Boost
EIGEN3
)
###########
## Build ##
###########
#===========
# includes =
#===========
include_directories(
include
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${catkin_INCLUDE_DIRS}
)
#============
# libraries =
#============
add_library(polar_to_cartesian_matrix_cache
src/polar_to_cartesian_matrix_cache.cpp
)
add_library(tf_rosmsg_eigen_conversions
src/tf_rosmsg_eigen_conversions.cpp
)
add_library(tf_collector
src/tf_collector.cpp
)
add_library(laserscan_to_pointcloud
src/laserscan_to_pointcloud.cpp
)
#==============
# executables =
#==============
add_executable(laserscan_to_pointcloud_assembler
src/laserscan_to_ros_pointcloud.cpp
src/laserscan_to_pointcloud_assembler.cpp
src/laserscan_to_pointcloud_assembler_node.cpp
)
#===============
# dependencies =
#===============
add_dependencies(polar_to_cartesian_matrix_cache
${catkin_EXPORTED_TARGETS}
)
add_dependencies(tf_rosmsg_eigen_conversions
${catkin_EXPORTED_TARGETS}
)
add_dependencies(tf_collector
tf_rosmsg_eigen_conversions
${catkin_EXPORTED_TARGETS}
)
add_dependencies(laserscan_to_pointcloud
tf_collector
polar_to_cartesian_matrix_cache
${catkin_EXPORTED_TARGETS}
)
add_dependencies(laserscan_to_pointcloud_assembler
laserscan_to_pointcloud
${PROJECT_NAME}_gencfg
${catkin_EXPORTED_TARGETS}
)
#=================
# libraries link =
#=================
target_link_libraries(polar_to_cartesian_matrix_cache
${catkin_LIBRARIES}
)
target_link_libraries(tf_rosmsg_eigen_conversions
${catkin_LIBRARIES}
)
target_link_libraries(tf_collector
tf_rosmsg_eigen_conversions
${catkin_LIBRARIES}
)
target_link_libraries(laserscan_to_pointcloud
tf_collector
polar_to_cartesian_matrix_cache
${catkin_LIBRARIES}
)
#===================
# executables link =
#===================
target_link_libraries(laserscan_to_pointcloud_assembler
laserscan_to_pointcloud
${catkin_LIBRARIES}
)
#############
## Install ##
#############
#============================
# Libraries and executables =
#============================
install(
TARGETS
polar_to_cartesian_matrix_cache
tf_rosmsg_eigen_conversions
tf_collector
laserscan_to_pointcloud
laserscan_to_pointcloud_assembler
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
#================
# Header files =
#================
install(
DIRECTORY
include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
#===============
# Launch files =
#===============
install(
DIRECTORY
launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)