change CMakeLists.txt of heartbeat to include packages for ros

This commit is contained in:
Sem van der Hoeven
2023-04-25 16:15:03 +02:00
parent 010559ea9b
commit 8b1790f763
6 changed files with 79 additions and 12 deletions

View File

@@ -18,6 +18,8 @@ endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(px4_ros_com REQUIRED)
find_package(px4_msgs REQUIRED)
add_executable(heartbeat src/heartbeat.cpp)
target_include_directories(heartbeat PUBLIC
@@ -25,7 +27,9 @@ target_include_directories(heartbeat PUBLIC
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(
heartbeat
"rclcpp"
rclcpp
px4_ros_com
px4_msgs
)
install(TARGETS heartbeat