-
Notifications
You must be signed in to change notification settings - Fork 60
/
CMakeLists.txt
102 lines (79 loc) · 3.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
cmake_minimum_required(VERSION 2.8.3)
project(laser_assembler)
##############################################################################
# Find dependencies
##############################################################################
set(THIS_PACKAGE_ROS_DEPS
tf sensor_msgs message_filters roscpp laser_geometry filters)
find_package(catkin REQUIRED COMPONENTS
${THIS_PACKAGE_ROS_DEPS}
message_generation)
find_package(Boost REQUIRED COMPONENTS system)
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
##############################################################################
# Build service definitions
##############################################################################
add_service_files(FILES
AssembleScans.srv
AssembleScans2.srv)
generate_messages(DEPENDENCIES sensor_msgs std_msgs)
##############################################################################
# Define package
##############################################################################
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS ${THIS_PACKAGE_ROS_DEPS} message_runtime
DEPENDS
)
##############################################################################
# Build
##############################################################################
add_executable(laser_scan_assembler_srv src/laser_scan_assembler_srv.cpp)
target_link_libraries(laser_scan_assembler_srv ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(laser_scan_assembler_srv ${PROJECT_NAME}_gencpp)
add_executable(laser_scan_assembler src/laser_scan_assembler.cpp)
target_link_libraries(laser_scan_assembler ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(laser_scan_assembler ${PROJECT_NAME}_gencpp)
add_executable(merge_clouds src/merge_clouds.cpp)
target_link_libraries(merge_clouds ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(merge_clouds ${PROJECT_NAME}_gencpp)
add_executable(point_cloud_assembler_srv src/point_cloud_assembler_srv.cpp)
target_link_libraries(point_cloud_assembler_srv ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(point_cloud_assembler_srv ${PROJECT_NAME}_gencpp)
add_executable(point_cloud_assembler src/point_cloud_assembler.cpp)
target_link_libraries(point_cloud_assembler ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(point_cloud_assembler ${PROJECT_NAME}_gencpp)
add_executable(point_cloud2_assembler src/point_cloud2_assembler.cpp)
target_link_libraries(point_cloud2_assembler ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(point_cloud2_assembler ${PROJECT_NAME}_gencpp)
## unit testing
if(CATKIN_ENABLE_TESTING)
find_package(rostest)
add_executable(periodic_snapshotter examples/periodic_snapshotter.cpp)
target_link_libraries(periodic_snapshotter ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(periodic_snapshotter ${PROJECT_NAME}_gencpp)
add_executable(dummy_scan_producer test/dummy_scan_producer.cpp)
target_link_libraries(dummy_scan_producer ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(dummy_scan_producer ${PROJECT_NAME}_gencpp)
add_executable(test_assembler test/test_assembler.cpp)
target_link_libraries(test_assembler ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
add_dependencies(test_assembler ${PROJECT_NAME}_gencpp)
add_rostest(test/test_laser_assembler.launch)
endif()
##############################################################################
# Install
##############################################################################
install(TARGETS
laser_scan_assembler_srv
laser_scan_assembler
merge_clouds
point_cloud_assembler_srv
point_cloud_assembler
point_cloud2_assembler
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})