-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (42 loc) · 1.3 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
cmake_minimum_required(VERSION 3.8)
project(combine_lidar)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
SET(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++20")
# Default to C++20
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 20)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
# Find dependencies for C++ and ROS
find_package(rclcpp REQUIRED)
# Find dependencies for ROS messages format
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
# external from ROS
find_package(Eigen3 REQUIRED)
include_directories(
include
${EIGEN3_INCLUDE_DIR}
)
# Add executable the generate | name must be the same as the launch file
add_executable(combine_lidar_node src/combine_livox.cpp src/math_utils.cpp)
# Link dependencies to the executable | name must be the same as the launch file
ament_target_dependencies(combine_lidar_node rclcpp std_msgs sensor_msgs)
# install the executable
install(TARGETS
combine_lidar_node
DESTINATION lib/${PROJECT_NAME})
# install the launch executable
install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}/)
ament_export_include_directories(include)
ament_package()