@@ -24,28 +24,23 @@ set_target_properties(moveit_ompl_interface
2424
2525find_package (OpenMP REQUIRED )
2626
27- # Used to link in ODE, an OMPL dependency, on macOS
28- if (APPLE )
29- target_link_directories (moveit_ompl_interface PUBLIC ${OMPL_LIBRARY_DIRS} )
30- endif ()
31-
3227ament_target_dependencies (
3328 moveit_ompl_interface
29+ PUBLIC
3430 moveit_core
3531 moveit_msgs
3632 moveit_ros_planning
3733 rclcpp
3834 pluginlib
3935 tf2_eigen
4036 tf2_ros
41- OMPL
4237 Boost )
4338set_target_properties (
4439 moveit_ompl_interface PROPERTIES COMPILE_FLAGS
4540 "${CMAKE_CXX_FLAGS } ${OpenMP_CXX_FLAGS} " )
4641set_target_properties (moveit_ompl_interface PROPERTIES LINK_FLAGS
4742 "${OpenMP_CXX_FLAGS} " )
48-
43+ target_link_libraries ( moveit_ompl_interface PUBLIC ompl::ompl )
4944add_executable (moveit_generate_state_database
5045 scripts/generate_state_database.cpp )
5146target_link_libraries (moveit_generate_state_database moveit_ompl_interface )
@@ -64,9 +59,9 @@ ament_target_dependencies(
6459 rclcpp
6560 pluginlib
6661 tf2_ros
67- OMPL
6862 Boost )
69- target_link_libraries (moveit_ompl_planner_plugin moveit_ompl_interface )
63+ target_link_libraries (moveit_ompl_planner_plugin moveit_ompl_interface
64+ ompl::ompl )
7065
7166install (TARGETS moveit_generate_state_database
7267 RUNTIME DESTINATION lib/${PROJECT_NAME } )
@@ -77,23 +72,24 @@ if(BUILD_TESTING)
7772 find_package (Eigen3 REQUIRED )
7873
7974 ament_add_gtest (test_state_space test /test_state_space.cpp )
80- ament_target_dependencies (test_state_space moveit_core OMPL Boost Eigen3 )
81- target_link_libraries (test_state_space moveit_ompl_interface )
75+ ament_target_dependencies (test_state_space moveit_core Boost Eigen3 )
76+ target_link_libraries (test_state_space moveit_ompl_interface ompl::ompl )
8277 set_target_properties (test_state_space PROPERTIES LINK_FLAGS
8378 "${OpenMP_CXX_FLAGS} " )
8479
8580 ament_add_gtest (test_state_validity_checker
8681 test /test_state_validity_checker.cpp )
87- ament_target_dependencies (test_state_validity_checker moveit_core OMPL Boost
82+ ament_target_dependencies (test_state_validity_checker moveit_core Boost
8883 Eigen3 )
89- target_link_libraries (test_state_validity_checker moveit_ompl_interface )
84+ target_link_libraries (test_state_validity_checker moveit_ompl_interface
85+ ompl::ompl )
9086 set_target_properties (test_state_validity_checker
9187 PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS} " )
9288
9389 ament_add_gtest (test_planning_context_manager
9490 test /test_planning_context_manager.cpp )
9591 ament_target_dependencies (test_planning_context_manager moveit_core tf2_eigen
96- OMPL Boost Eigen3 )
92+ Boost Eigen3 )
9793 target_link_libraries (test_planning_context_manager moveit_ompl_interface )
9894
9995 # Disabling flaky test TODO (vatanaksoytezer): Uncomment once this is fixed
@@ -104,25 +100,25 @@ if(BUILD_TESTING)
104100 ament_add_gtest (test_constrained_planning_state_space
105101 test /test_constrained_planning_state_space.cpp )
106102 ament_target_dependencies (test_constrained_planning_state_space moveit_core
107- OMPL Boost Eigen3 )
103+ Boost Eigen3 )
108104 target_link_libraries (test_constrained_planning_state_space
109- moveit_ompl_interface )
105+ moveit_ompl_interface ompl::ompl )
110106 set_target_properties (test_constrained_planning_state_space
111107 PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS} " )
112108
113109 ament_add_gtest (test_constrained_state_validity_checker
114110 test /test_constrained_state_validity_checker.cpp )
115111 ament_target_dependencies (test_constrained_state_validity_checker moveit_core
116- OMPL Boost Eigen3 )
112+ Boost Eigen3 )
117113 target_link_libraries (test_constrained_state_validity_checker
118- moveit_ompl_interface )
114+ moveit_ompl_interface ompl::ompl )
119115 set_target_properties (test_constrained_state_validity_checker
120116 PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS} " )
121117
122118 ament_add_gtest (test_threadsafe_state_storage
123119 test /test_threadsafe_state_storage.cpp )
124- ament_target_dependencies (test_threadsafe_state_storage moveit_core OMPL
125- Boost Eigen3 )
120+ ament_target_dependencies (test_threadsafe_state_storage moveit_core Boost
121+ Eigen3 )
126122 target_link_libraries (test_threadsafe_state_storage moveit_ompl_interface )
127123 set_target_properties (test_threadsafe_state_storage
128124 PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS} " )
0 commit comments