@@ -10,12 +10,11 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1010endif ()
1111
1212if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE )
13- message ("${PROJECT_NAME} : You did not request a specific build type: selecting 'RelWithDebInfo'." )
13+ message (STATUS "${PROJECT_NAME} : You did not request a specific build type: selecting 'RelWithDebInfo'." )
1414 set (CMAKE_BUILD_TYPE RelWithDebInfo)
1515endif ()
1616
1717find_package (ament_cmake REQUIRED)
18- find_package (rcl REQUIRED)
1918find_package (rclcpp REQUIRED)
2019find_package (diagnostic_msgs REQUIRED)
2120find_package (diagnostic_updater REQUIRED)
@@ -105,7 +104,6 @@ ament_target_dependencies(
105104 geographic_msgs
106105 geometry_msgs
107106 nav_msgs
108- rcl
109107 rclcpp
110108 sensor_msgs
111109 std_msgs
@@ -162,7 +160,7 @@ if(BUILD_TESTING)
162160 find_package (ament_cmake_cpplint REQUIRED)
163161 find_package (ament_cmake_lint_cmake REQUIRED)
164162 find_package (ament_cmake_uncrustify REQUIRED)
165- find_package (launch_testing_ament_cmake)
163+ find_package (launch_testing_ament_cmake REQUIRED )
166164
167165 #### FILTER BASE TESTS ####
168166 ament_add_gtest(filter_base-test test /test_filter_base.cpp)
@@ -172,6 +170,8 @@ if(BUILD_TESTING)
172170 ament_add_gtest_executable(test_filter_base_diagnostics_timestamps
173171 test /test_filter_base_diagnostics_timestamps.cpp)
174172 target_link_libraries (test_filter_base_diagnostics_timestamps ${library_name} )
173+ rosidl_target_interfaces(test_filter_base_diagnostics_timestamps
174+ ${PROJECT_NAME} "rosidl_typesupport_cpp" )
175175 add_dependencies (test_filter_base_diagnostics_timestamps ekf_node)
176176 ament_add_test(test_filter_base_diagnostics_timestamps
177177 GENERATE_RESULT_FOR_RETURN_CODE_ZERO
@@ -183,10 +183,14 @@ if(BUILD_TESTING)
183183 #### EKF TESTS ######
184184 ament_add_gtest(test_ekf test /test_ekf.cpp)
185185 target_link_libraries (test_ekf ${library_name} )
186+ rosidl_target_interfaces(test_ekf
187+ ${PROJECT_NAME} "rosidl_typesupport_cpp" )
186188
187189 ament_add_gtest_executable(test_ekf_localization_node_interfaces
188190 test /test_ekf_localization_node_interfaces.cpp)
189191 target_link_libraries (test_ekf_localization_node_interfaces ${library_name} )
192+ rosidl_target_interfaces(test_ekf_localization_node_interfaces
193+ ${PROJECT_NAME} "rosidl_typesupport_cpp" )
190194 add_dependencies (test_ekf_localization_node_interfaces ekf_node)
191195 ament_add_test(test_ekf_localization_node_interfaces
192196 GENERATE_RESULT_FOR_RETURN_CODE_ZERO
@@ -198,11 +202,15 @@ if(BUILD_TESTING)
198202 #### UKF TESTS #####
199203 ament_add_gtest(test_ukf test /test_ukf.cpp)
200204 target_link_libraries (test_ukf ${library_name} )
205+ rosidl_target_interfaces(test_ukf
206+ ${PROJECT_NAME} "rosidl_typesupport_cpp" )
201207
202208
203209 ament_add_gtest_executable(test_ukf_localization_node_interfaces
204210 test /test_ukf_localization_node_interfaces.cpp)
205211 target_link_libraries (test_ukf_localization_node_interfaces ${library_name} )
212+ rosidl_target_interfaces(test_ukf_localization_node_interfaces
213+ ${PROJECT_NAME} "rosidl_typesupport_cpp" )
206214 add_dependencies (test_ukf_localization_node_interfaces ekf_node)
207215 ament_add_test(test_ukf_localization_node_interfaces
208216 GENERATE_RESULT_FOR_RETURN_CODE_ZERO
@@ -234,6 +242,8 @@ if(BUILD_TESTING)
234242 ament_add_gtest_executable(test_robot_localization_estimator
235243 test /test_robot_localization_estimator.cpp)
236244 target_link_libraries (test_robot_localization_estimator ${library_name} )
245+ rosidl_target_interfaces(test_robot_localization_estimator
246+ ${PROJECT_NAME} "rosidl_typesupport_cpp" )
237247 ament_add_test(test_robot_localization_estimator
238248 GENERATE_RESULT_FOR_RETURN_CODE_ZERO
239249 TIMEOUT 100
@@ -244,9 +254,13 @@ if(BUILD_TESTING)
244254 ament_add_gtest_executable(test_ros_robot_localization_listener
245255 test /test_ros_robot_localization_listener.cpp)
246256 target_link_libraries (test_ros_robot_localization_listener ${library_name} )
257+ rosidl_target_interfaces(test_ros_robot_localization_listener
258+ ${PROJECT_NAME} "rosidl_typesupport_cpp" )
247259 ament_add_gtest_executable(test_ros_robot_localization_listener_publisher
248260 test /test_ros_robot_localization_listener_publisher.cpp)
249261 target_link_libraries (test_ros_robot_localization_listener_publisher ${library_name} )
262+ rosidl_target_interfaces(test_ros_robot_localization_listener_publisher
263+ ${PROJECT_NAME} "rosidl_typesupport_cpp" )
250264 ament_add_test(test_ros_robot_localization_listener
251265 GENERATE_RESULT_FOR_RETURN_CODE_ZERO
252266 TIMEOUT 100
@@ -307,4 +321,5 @@ install(DIRECTORY
307321
308322ament_export_include_directories(include )
309323ament_export_libraries(${library_name} )
324+ ament_export_dependencies(rosidl_default_runtime)
310325ament_package()
0 commit comments