export targets in a addition to include directories / libraries (#1096)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
This commit is contained in:
parent
e0bf4a9c20
commit
45f3976453
2 changed files with 13 additions and 5 deletions
|
@ -16,8 +16,6 @@ find_package(rcl_lifecycle REQUIRED)
|
|||
find_package(rosidl_typesupport_cpp REQUIRED)
|
||||
find_package(lifecycle_msgs REQUIRED)
|
||||
|
||||
include_directories(include)
|
||||
|
||||
### CPP High level library
|
||||
add_library(rclcpp_lifecycle
|
||||
src/lifecycle_node.cpp
|
||||
|
@ -25,6 +23,10 @@ add_library(rclcpp_lifecycle
|
|||
src/state.cpp
|
||||
src/transition.cpp
|
||||
)
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:include>")
|
||||
# specific order: dependents before dependencies
|
||||
ament_target_dependencies(rclcpp_lifecycle
|
||||
"rclcpp"
|
||||
|
@ -38,7 +40,7 @@ ament_target_dependencies(rclcpp_lifecycle
|
|||
target_compile_definitions(rclcpp_lifecycle PRIVATE "RCLCPP_LIFECYCLE_BUILDING_DLL")
|
||||
|
||||
install(TARGETS
|
||||
rclcpp_lifecycle
|
||||
rclcpp_lifecycle EXPORT rclcpp_lifecycle
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin)
|
||||
|
@ -102,6 +104,7 @@ endif()
|
|||
# specific order: dependents before dependencies
|
||||
ament_export_include_directories(include)
|
||||
ament_export_libraries(${PROJECT_NAME})
|
||||
ament_export_targets(${PROJECT_NAME})
|
||||
ament_export_dependencies(rclcpp)
|
||||
ament_export_dependencies(rcl_lifecycle)
|
||||
ament_export_dependencies(lifecycle_msgs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue