Skip to content

Commit

Permalink
export targets in a addition to include directories / libraries (#218)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
  • Loading branch information
dirk-thomas authored Apr 22, 2020
1 parent f238674 commit 21dc0db
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rmw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ find_package(rcutils REQUIRED)

include(cmake/configure_rmw_library.cmake)

include_directories(include)

set(rmw_sources
"src/allocators.c"
"src/convert_rcutils_ret_to_rmw_ret.c"
Expand All @@ -44,6 +42,9 @@ set(rmw_sources
)
set_source_files_properties(${rmw_sources} PROPERTIES LANGUAGE "C")
add_library(${PROJECT_NAME} ${rmw_sources})
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
ament_target_dependencies(${PROJECT_NAME}
"rcutils"
)
Expand All @@ -55,6 +56,7 @@ ament_export_dependencies(
)
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_targets(${PROJECT_NAME})

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
Expand All @@ -75,7 +77,7 @@ install(
DESTINATION include
)
install(
TARGETS ${PROJECT_NAME}
TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
Expand Down

0 comments on commit 21dc0db

Please sign in to comment.