From 053489bcc042f7d58331129f1f0653cbe6f1621f Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 22 Apr 2020 22:38:45 -0700 Subject: [PATCH] export targets in a addition to include directories / libraries Signed-off-by: Dirk Thomas --- pluginlib/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pluginlib/CMakeLists.txt b/pluginlib/CMakeLists.txt index 3652d5b2..054491b7 100644 --- a/pluginlib/CMakeLists.txt +++ b/pluginlib/CMakeLists.txt @@ -18,8 +18,18 @@ find_package(rcpputils REQUIRED) find_package(tinyxml2_vendor REQUIRED) find_package(TinyXML2 REQUIRED) # provided by tinyxml2 upstream, or tinyxml2_vendor +add_library(${PROJECT_NAME} INTERFACE) +target_include_directories(${PROJECT_NAME} INTERFACE + "$") +ament_target_dependencies(${PROJECT_NAME} INTERFACE + ament_index_cpp class_loader rcutils rcpputils tinyxml2_vendor TinyXML2) ament_export_dependencies(ament_index_cpp class_loader rcutils rcpputils tinyxml2_vendor TinyXML2) ament_export_include_directories(include) +ament_export_targets(${PROJECT_NAME}) + +install( + TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME} +) install( DIRECTORY cmake