-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
148 lines (121 loc) · 2.63 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
cmake_minimum_required(VERSION 3.0.2)
project(pcdfilter_pa)
find_package(PCL REQUIRED)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
# bugfix for g++-Warning
# "<command-line>:0:15: warning: missing whitespace after the macro name"
remove_definitions(-DDISABLE_LIBUSB-1.0)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
sensor_msgs
std_srvs
message_generation
tf
laser_geometry
cv_bridge
image_transport
pcl_ros
pcl_conversions
parameter_pa
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_service_files(
FILES
PcdFilterPaFilter.srv
PcdFilterPaCloud.srv
)
generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
)
catkin_package(
DEPENDS
INCLUDE_DIRS
include
CATKIN_DEPENDS
roscpp
std_msgs
sensor_msgs
std_srvs
message_runtime
tf
laser_geometry
cv_bridge
image_transport
pcl_ros
pcl_conversions
parameter_pa
LIBRARIES
${PROJECT_NAME}
${PROJECT_NAME}_ros
)
### exported libraries
add_library(${PROJECT_NAME}
src/${PROJECT_NAME}.cpp
src/${PROJECT_NAME}_parameter.cpp
src/${PROJECT_NAME}_filter.cpp
)
add_dependencies(${PROJECT_NAME}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
)
add_library(${PROJECT_NAME}_ros
src/${PROJECT_NAME}_ros.cpp
src/${PROJECT_NAME}_ros_parameter.cpp
src/${PROJECT_NAME}_ros_throttle.cpp
src/${PROJECT_NAME}_ros_filter.cpp
)
add_dependencies(${PROJECT_NAME}_ros
${catkin_EXPORTED_TARGETS}
${PROJECT_NAME}
)
target_link_libraries(${PROJECT_NAME}_ros
${catkin_LIBRARIES}
${PROJECT_NAME}
)
### simple nodes
add_executable(${PROJECT_NAME}_node
src/${PROJECT_NAME}_node.cpp
src/${PROJECT_NAME}_node_parameter.cpp
)
add_dependencies(${PROJECT_NAME}_node
${catkin_EXPORTED_TARGETS}
${PROJECT_NAME}
${PROJECT_NAME}_ros
${PROJECT_NAME}_generate_messages_cpp
${PROJECT_NAME}_gencpp
)
target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES}
${PROJECT_NAME}
${PROJECT_NAME}_ros
)
## Install ##
install(
TARGETS
${PROJECT_NAME}
${PROJECT_NAME}_ros
${PROJECT_NAME}_node
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h" PATTERN "*.hxx"
)
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch"
)
install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
FILES_MATCHING PATTERN "*.yaml" PATTERN "*.rviz"
)