Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export targets in a addition to include directories / libraries #371

Merged
merged 1 commit into from
Apr 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions rmw_fastrtps_shared_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ find_package(fastrtps REQUIRED CONFIG)
find_package(FastRTPS REQUIRED MODULE)

find_package(rmw REQUIRED)
include_directories(include)

add_library(rmw_fastrtps_shared_cpp
src/custom_publisher_info.cpp
Expand Down Expand Up @@ -86,7 +85,10 @@ add_library(rmw_fastrtps_shared_cpp
src/subscription.cpp
src/TypeSupport_impl.cpp
)

target_include_directories(rmw_fastrtps_shared_cpp
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
target_link_libraries(rmw_fastrtps_shared_cpp
fastcdr fastrtps
)
Expand All @@ -107,6 +109,7 @@ PRIVATE "RMW_FASTRTPS_SHARED_CPP_BUILDING_LIBRARY")
# specific order: dependents before dependencies
ament_export_include_directories(include)
ament_export_libraries(rmw_fastrtps_shared_cpp)
ament_export_targets(rmw_fastrtps_shared_cpp)

ament_export_dependencies(rcpputils)
ament_export_dependencies(rcutils)
Expand All @@ -128,7 +131,7 @@ install(
)

install(
TARGETS rmw_fastrtps_shared_cpp
TARGETS rmw_fastrtps_shared_cpp EXPORT rmw_fastrtps_shared_cpp
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
Expand Down