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

change export order for static linking #190

Merged
merged 1 commit into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
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
16 changes: 9 additions & 7 deletions rmw_fastrtps_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ find_package(rosidl_generator_c REQUIRED)
find_package(rosidl_typesupport_introspection_c REQUIRED)
find_package(rosidl_typesupport_introspection_cpp REQUIRED)

ament_export_dependencies(rcutils)
ament_export_dependencies(rmw)
ament_export_dependencies(rosidl_generator_c)
ament_export_dependencies(rosidl_typesupport_introspection_c)
ament_export_dependencies(rosidl_typesupport_introspection_cpp)

include_directories(include)

add_library(rmw_fastrtps_cpp
Expand Down Expand Up @@ -87,6 +81,7 @@ add_library(rmw_fastrtps_cpp
target_link_libraries(rmw_fastrtps_cpp
fastcdr fastrtps)

# specific order: dependents before dependencies
ament_target_dependencies(rmw_fastrtps_cpp
"rcutils"
"rosidl_typesupport_introspection_c"
Expand All @@ -102,9 +97,16 @@ configure_rmw_library(rmw_fastrtps_cpp)
target_compile_definitions(${PROJECT_NAME}
PRIVATE "RMW_FASTRTPS_CPP_BUILDING_LIBRARY")

# specific order: dependents before dependencies
ament_export_include_directories(include)
ament_export_libraries(rmw_fastrtps_cpp)

ament_export_dependencies(rosidl_typesupport_introspection_cpp)
ament_export_dependencies(rosidl_typesupport_introspection_c)
ament_export_dependencies(rosidl_generator_c)
ament_export_dependencies(rcutils)
ament_export_dependencies(rmw)

register_rmw_implementation(
"c:rosidl_typesupport_c:rosidl_typesupport_introspection_c"
"cpp:rosidl_typesupport_cpp:rosidl_typesupport_introspection_cpp")
Expand All @@ -115,7 +117,7 @@ if(BUILD_TESTING)
endif()

ament_package(
CONFIG_EXTRAS "rmw_fastrtps_cpp-extras.cmake"
CONFIG_EXTRAS_POST "rmw_fastrtps_cpp-extras.cmake"
)

install(
Expand Down
3 changes: 2 additions & 1 deletion rmw_fastrtps_cpp/rmw_fastrtps_cpp-extras.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ find_package(fastrtps REQUIRED CONFIG)
find_package(FastRTPS REQUIRED MODULE)

list(APPEND rmw_fastrtps_cpp_INCLUDE_DIRS ${FastRTPS_INCLUDE_DIR})
list(APPEND rmw_fastrtps_cpp_LIBRARIES fastcdr fastrtps)
# specific order: dependents before dependencies
list(APPEND rmw_fastrtps_cpp_LIBRARIES fastrtps fastcdr)