11cmake_minimum_required (VERSION 3.5)
22project (plansys2_simple_example_py)
33
4-
54find_package (ament_cmake REQUIRED)
65find_package (rclcpp REQUIRED)
7- find_package (plansys2_msgs REQUIRED)
86find_package (plansys2_executor REQUIRED)
97
108find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
@@ -13,25 +11,27 @@ ament_python_install_package(${PROJECT_NAME})
1311
1412set (CMAKE_CXX_STANDARD 17)
1513
16- set (dependencies
17- rclcpp
18- plansys2_msgs
19- plansys2_executor
20- )
21-
2214add_executable (move_action_node src/move_action_node.cpp)
23- ament_target_dependencies(move_action_node ${dependencies} )
15+ target_link_libraries (move_action_node
16+ PRIVATE
17+ plansys2_executor::plansys2_executor
18+ rclcpp::rclcpp
19+ )
2420
2521add_executable (ask_charge_action_node src/ask_charge_action_node.cpp)
26- ament_target_dependencies(ask_charge_action_node ${dependencies} )
22+ target_link_libraries (ask_charge_action_node
23+ PRIVATE
24+ plansys2_executor::plansys2_executor
25+ rclcpp::rclcpp
26+ )
2727
28- install (DIRECTORY launch pddl DESTINATION share/${PROJECT_NAME} )
28+ install (DIRECTORY launch pddl
29+ DESTINATION share/${PROJECT_NAME}
30+ )
2931
3032install (TARGETS
3133 move_action_node
3234 ask_charge_action_node
33- ARCHIVE DESTINATION lib
34- LIBRARY DESTINATION lib
3535 RUNTIME DESTINATION lib/${PROJECT_NAME}
3636)
3737
@@ -47,6 +47,9 @@ if(BUILD_TESTING)
4747 find_package (ament_cmake_gtest REQUIRED)
4848endif ()
4949
50- ament_export_dependencies(${dependencies} )
50+ ament_export_dependencies(
51+ plansys2_executor
52+ rclcpp
53+ )
5154
5255ament_package()
0 commit comments