forked from ros-perception/laser_filters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
85 lines (67 loc) · 3.21 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
cmake_minimum_required(VERSION 2.8.3)
project(laser_filters)
##############################################################################
# Find dependencies
##############################################################################
set(THIS_PACKAGE_ROS_DEPS sensor_msgs roscpp tf filters message_filters
laser_geometry pluginlib angles nodelet)
find_package(catkin REQUIRED COMPONENTS ${THIS_PACKAGE_ROS_DEPS})
find_package(Boost REQUIRED COMPONENTS system)
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
##############################################################################
# Define package
##############################################################################
catkin_package(
INCLUDE_DIRS include
LIBRARIES pointcloud_filters laser_scan_filters
CATKIN_DEPENDS ${THIS_PACKAGE_ROS_DEPS}
DEPENDS
)
##############################################################################
# Build
##############################################################################
add_library(pointcloud_filters src/pointcloud_filters.cpp)
target_link_libraries(pointcloud_filters ${catkin_LIBRARIES})
add_library(laser_scan_filters
src/laser_scan_filters.cpp
src/median_filter.cpp
src/array_filter.cpp
src/box_filter.cpp
src/scan_to_scan_filter_chain.cpp
src/scan_to_cloud_filter_chain.cpp
src/scan_to_scan_filter_chain_nodelet.cpp
src/scan_to_cloud_filter_chain_nodelet.cpp
)
target_link_libraries(laser_scan_filters ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_executable(scan_to_cloud_filter_chain src/scan_to_cloud_filter_chain_node.cpp)
target_link_libraries(scan_to_cloud_filter_chain laser_scan_filters ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_executable(scan_to_scan_filter_chain src/scan_to_scan_filter_chain_node.cpp)
target_link_libraries(scan_to_scan_filter_chain laser_scan_filters ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_executable(generic_laser_filter_node src/generic_laser_filter_node.cpp)
target_link_libraries(generic_laser_filter_node ${catkin_LIBRARIES} ${Boost_LIBRARIES})
if (CATKIN_ENABLE_TESTING)
find_package(rostest)
add_executable(test_scan_filter_chain test/test_scan_filter_chain.cpp)
target_link_libraries(test_scan_filter_chain laser_scan_filters ${rostest_LIBRARIES} ${GTEST_LIBRARIES})
add_dependencies(test_scan_filter_chain gtest)
add_rostest(test/test_scan_filter_chain.launch)
catkin_add_gtest(test_shadow_detector test/test_shadow_detector.cpp)
target_link_libraries(test_shadow_detector ${catkin_LIBRARIES} ${rostest_LIBRARIES})
endif()
##############################################################################
# Install
##############################################################################
install(TARGETS pointcloud_filters laser_scan_filters
scan_to_cloud_filter_chain
scan_to_scan_filter_chain
generic_laser_filter_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# Install headers
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(FILES laser_filters_plugins.xml nodelet_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)