-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (29 loc) · 1 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
cmake_minimum_required(VERSION 3.8)
project(asl_flight2)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find global dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED NO_MODULE)
# find local dependencies
find_package(px4_ros_com REQUIRED)
find_package(px4_msgs REQUIRED)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
# executables
add_executable(controller_base src/controller_base.cpp)
target_include_directories(controller_base PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(controller_base rclcpp px4_ros_com px4_msgs Eigen3)
install(TARGETS
controller_base
DESTINATION lib/${PROJECT_NAME})
ament_export_dependencies(eigen3_cmake_module)
ament_export_dependencies(Eigen3)
ament_package()