cmake_minimum_required(VERSION 3.16) project(bt_executor LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(ament_cmake REQUIRED) find_package(ament_index_cpp REQUIRED) find_package(rclcpp REQUIRED) find_package(rclcpp_action REQUIRED) find_package(bt_skill_interfaces REQUIRED) find_package(geometry_msgs REQUIRED) find_package(std_msgs REQUIRED) find_package(behaviortree_cpp 4.10.0 EXACT REQUIRED) find_package(nlohmann_json REQUIRED) # The repository includes a ROS-free core. Both standalone tests and this node # compile these exact sources; no second implementation of the workflow exists. add_library(robot_bt_core STATIC ../../core/src/core.cpp ../../core/src/workflow.cpp) target_include_directories(robot_bt_core PUBLIC ../../core/include) add_executable(bt_executor_node src/executor_node.cpp src/ros_driver.cpp) target_include_directories(bt_executor_node PRIVATE include) target_link_libraries(bt_executor_node robot_bt_core BT::behaviortree_cpp nlohmann_json::nlohmann_json) ament_target_dependencies(bt_executor_node ament_index_cpp rclcpp rclcpp_action bt_skill_interfaces geometry_msgs std_msgs) target_compile_options(bt_executor_node PRIVATE -Wall -Wextra -Wpedantic) install(TARGETS bt_executor_node DESTINATION lib/${PROJECT_NAME}) install(DIRECTORY trees launch config DESTINATION share/${PROJECT_NAME}) ament_package()