From 1f7cb7928d05e5065344801a369e15ffcf6252b0 Mon Sep 17 00:00:00 2001 From: "David V. Lu" Date: Fri, 9 May 2025 13:48:52 -0400 Subject: [PATCH 1/2] New Export / Deprecate ament_target_libraries --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d87b506..f63d2d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,8 +14,8 @@ include_directories(include) add_library(${PROJECT_NAME} SHARED src/random_numbers.cpp ) - -ament_target_dependencies(${PROJECT_NAME} Boost) +target_link_libraries(${PROJECT_NAME} Boost) +ament_export_targets(export_${PROJECT_NAME}) ament_export_libraries(${PROJECT_NAME}) ament_export_dependencies(Boost) ament_export_include_directories(include) @@ -24,6 +24,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE install( TARGETS ${PROJECT_NAME} + EXPORT export_${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin From b7e1b07befaf66ab0f22c2af954f4463b752eafb Mon Sep 17 00:00:00 2001 From: "David V. Lu!!" Date: Thu, 22 May 2025 17:57:03 -0400 Subject: [PATCH 2/2] Update CMakeLists.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alejandro Hernández Cordero --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f63d2d2..e0d6fc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ include_directories(include) add_library(${PROJECT_NAME} SHARED src/random_numbers.cpp ) -target_link_libraries(${PROJECT_NAME} Boost) +target_link_libraries(${PROJECT_NAME} Boost::random) ament_export_targets(export_${PROJECT_NAME}) ament_export_libraries(${PROJECT_NAME}) ament_export_dependencies(Boost)