File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,11 +38,21 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
3838 rclcpp::rclcpp
3939 rclcpp_action::rclcpp_action
4040 ament_index_cpp::ament_index_cpp
41- behaviortree_cpp::behaviortree_cpp
4241 ${btcpp_ros2_interfaces_TARGETS}
4342 bt_executor_parameters
4443)
4544
45+ if (TARGET BT::behaviortree_cpp)
46+ target_link_libraries (${PROJECT_NAME} PUBLIC BT::behaviortree_cpp )
47+ elseif (TARGET behaviortree_cpp::behaviortree_cpp)
48+ target_link_libraries (${PROJECT_NAME} PUBLIC behaviortree_cpp::behaviortree_cpp )
49+ else ()
50+ message (FATAL_ERROR
51+ "behaviortree_cpp was found, but it did not export a known CMake target. "
52+ "Expected BT::behaviortree_cpp or behaviortree_cpp::behaviortree_cpp."
53+ )
54+ endif ()
55+
4656
4757######################################################
4858# INSTALL
You can’t perform that action at this time.
0 commit comments