-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
80 lines (66 loc) · 2.04 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
cmake_minimum_required(VERSION 3.0)
project(pointcloud_merger)
find_package(catkin REQUIRED COMPONENTS
message_filters
nodelet
roscpp
rospy
sensor_msgs
pcl_conversions
pcl_ros
tf2
tf2_ros
tf2_sensor_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES pointcloud_merger
CATKIN_DEPENDS message_filters nodelet roscpp rospy sensor_msgs tf2 tf2_ros tf2_sensor_msgs pcl_conversions pcl_ros
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_library(pointcloud_merger src/pointcloud_merger_nodelet.cpp)
target_link_libraries(pointcloud_merger ${catkin_LIBRARIES})
add_executable(pointcloud_merger_node src/pointcloud_merger_node.cpp)
target_link_libraries(pointcloud_merger_node pointcloud_merger ${catkin_LIBRARIES})
install(TARGETS
pointcloud_merger
pointcloud_merger_node
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(FILES nodelets.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
if(CATKIN_ENABLE_TESTING)
find_package(roslint REQUIRED)
roslint_cpp(src/pointcloud_merger_nodelet.cpp)
roslint_cpp(src/pointcloud_merger_node.cpp)
roslint_add_test()
if (CMAKE_BUILD_TYPE STREQUAL "Debug" )
add_compile_definitions(DEBUG)
endif ()
#PCL REQUIREMENT
find_package(PCL 1.2 REQUIRED)
find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
find_package(rostest REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
catkin_add_gtest(${PROJECT_NAME}_test
test/test_pc_merger.cpp
test/test_pc_merger.h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test)
target_link_libraries( ${PROJECT_NAME}_test
${PROJECT_NAME}
${catkin_LIBRARIES}
${PCL_LIBRARIES})
endif()