forked from giuschio/scan_merger_2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (53 loc) · 1.93 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
cmake_minimum_required(VERSION 3.5)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
project(laser_scan_merger)
# set(CMAKE_CXX_FLAGS "-std=c++11 -fpermissive ${CMAKE_CXX_FLAGS} -Wfatal-errors\ ")
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(tf2_sensor_msgs REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(laser_geometry REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(Boost 1.54.0 REQUIRED system)
set(PROJECT_INCLUDE_DIRS include)
set(PROJECT_DEPENDS "rclcpp" "std_msgs" "std_srvs" "tf2_sensor_msgs" "geometry_msgs"
"sensor_msgs" "tf2" "tf2_geometry_msgs" "tf2_ros" "laser_geometry")
include_directories(include ${PROJECT_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
# Build libs
add_library(scans_merger src/scans_merger.cpp)
target_link_libraries(scans_merger ${ARMADILLO_LIBRARIES})
ament_target_dependencies(scans_merger ${PROJECT_DEPENDS})
# Build nodes
add_executable(scans_merger_node src/nodes/scans_merger_node.cpp)
target_link_libraries(scans_merger_node scans_merger)
install(TARGETS scans_merger
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
)
#
# Install nodes
#
# install(TARGETS scans_merger_node obstacle_extractor_node obstacle_tracker_node obstacle_publisher_node
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(TARGETS scans_merger_node scans_merger_node
RUNTIME DESTINATION lib/${PROJECT_NAME}
)
## Mark other files for installation (e.g. launch and bag files, etc.)
install(
DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}/
)
ament_package()