diff --git a/rcl_logging_interface/CMakeLists.txt b/rcl_logging_interface/CMakeLists.txt index 6c67659..8caceb0 100644 --- a/rcl_logging_interface/CMakeLists.txt +++ b/rcl_logging_interface/CMakeLists.txt @@ -26,7 +26,7 @@ add_library(${PROJECT_NAME} ${${PROJECT_NAME}_sources}) target_include_directories(${PROJECT_NAME} PUBLIC "$" "$") -ament_target_dependencies(${PROJECT_NAME} rcutils) +target_link_libraries(${PROJECT_NAME} PUBLIC rcutils::rcutils) target_compile_definitions(${PROJECT_NAME} PRIVATE "RCL_LOGGING_INTERFACE_BUILDING_DLL") install( @@ -54,8 +54,7 @@ if(BUILD_TESTING) find_package(rcpputils REQUIRED) ament_add_gtest(test_get_logging_directory test/test_get_logging_directory.cpp) if(TARGET test_get_logging_directory) - target_link_libraries(test_get_logging_directory ${PROJECT_NAME}) - ament_target_dependencies(test_get_logging_directory rcutils rcpputils) + target_link_libraries(test_get_logging_directory ${PROJECT_NAME} rcpputils::rcpputils rcutils::rcutils) endif() endif() diff --git a/rcl_logging_noop/CMakeLists.txt b/rcl_logging_noop/CMakeLists.txt index 9b47131..6419032 100644 --- a/rcl_logging_noop/CMakeLists.txt +++ b/rcl_logging_noop/CMakeLists.txt @@ -44,8 +44,6 @@ install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME} RUNTIME DESTINATION bin) -# Export rcl_logging_interface to give downstream packages access to it's headers -ament_export_dependencies(rcl_logging_interface) ament_export_libraries(${PROJECT_NAME}) ament_export_targets(${PROJECT_NAME}) ament_package() diff --git a/rcl_logging_spdlog/CMakeLists.txt b/rcl_logging_spdlog/CMakeLists.txt index f280f00..9c58fa2 100644 --- a/rcl_logging_spdlog/CMakeLists.txt +++ b/rcl_logging_spdlog/CMakeLists.txt @@ -59,9 +59,8 @@ if(BUILD_TESTING) find_package(ament_cmake_gtest REQUIRED) ament_add_gmock(test_logging_interface test/test_logging_interface.cpp) if(TARGET test_logging_interface) - target_link_libraries(test_logging_interface ${PROJECT_NAME}) + target_link_libraries(test_logging_interface ${PROJECT_NAME} rcpputils::rcpputils) target_compile_definitions(test_logging_interface PUBLIC RCUTILS_ENABLE_FAULT_INJECTION) - ament_target_dependencies(test_logging_interface rcpputils) endif() add_performance_test(benchmark_logging_interface test/benchmark/benchmark_logging_interface.cpp) if(TARGET benchmark_logging_interface) @@ -69,11 +68,6 @@ if(BUILD_TESTING) endif() endif() -ament_export_dependencies(rcl_logging_interface) -ament_export_dependencies(rcpputils) -ament_export_dependencies(rcutils) -ament_export_dependencies(spdlog_vendor) -ament_export_dependencies(spdlog) ament_export_libraries(${PROJECT_NAME}) ament_export_targets(${PROJECT_NAME}) ament_package()