export targets in a addition to include directories / libraries (#632)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
This commit is contained in:
parent
8a0ec5fe95
commit
b343368840
1 changed files with 6 additions and 7 deletions
|
@ -10,12 +10,6 @@ find_package(rcutils REQUIRED)
|
||||||
find_package(rmw REQUIRED)
|
find_package(rmw REQUIRED)
|
||||||
find_package(rosidl_runtime_c REQUIRED)
|
find_package(rosidl_runtime_c REQUIRED)
|
||||||
|
|
||||||
include_directories(
|
|
||||||
include
|
|
||||||
${action_msgs_INCLUDE_DIRS}
|
|
||||||
${rcl_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Default to C11
|
# Default to C11
|
||||||
if(NOT CMAKE_C_STANDARD)
|
if(NOT CMAKE_C_STANDARD)
|
||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
@ -49,6 +43,10 @@ add_library(${PROJECT_NAME}
|
||||||
${rcl_action_sources}
|
${rcl_action_sources}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||||
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||||
|
"$<INSTALL_INTERFACE:include>")
|
||||||
|
|
||||||
ament_target_dependencies(${PROJECT_NAME}
|
ament_target_dependencies(${PROJECT_NAME}
|
||||||
"action_msgs"
|
"action_msgs"
|
||||||
"rcl"
|
"rcl"
|
||||||
|
@ -67,7 +65,7 @@ install(
|
||||||
DESTINATION include
|
DESTINATION include
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME}
|
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
|
@ -205,6 +203,7 @@ endif()
|
||||||
# specific order: dependents before dependencies
|
# specific order: dependents before dependencies
|
||||||
ament_export_include_directories(include)
|
ament_export_include_directories(include)
|
||||||
ament_export_libraries(${PROJECT_NAME})
|
ament_export_libraries(${PROJECT_NAME})
|
||||||
|
ament_export_targets(${PROJECT_NAME})
|
||||||
ament_export_dependencies(action_msgs)
|
ament_export_dependencies(action_msgs)
|
||||||
ament_export_dependencies(ament_cmake)
|
ament_export_dependencies(ament_cmake)
|
||||||
ament_export_dependencies(rcl)
|
ament_export_dependencies(rcl)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue