change export order for static linking (#216)

This commit is contained in:
Dirk Thomas 2018-03-22 16:26:33 -07:00 committed by GitHub
parent 5fa1b0e0d9
commit bad0f55416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 11 deletions

View file

@ -47,11 +47,12 @@ set(${PROJECT_NAME}_sources
)
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_sources})
# specific order: dependents before dependencies
ament_target_dependencies(${PROJECT_NAME}
"rcl_interfaces"
"rcutils"
"rmw"
"rmw_implementation"
"rmw"
"rcutils"
"rosidl_generator_c"
)
@ -71,17 +72,17 @@ install(
# This is overwritten each loop, but which one it points to doesn't really matter.
set(rcl_lib_dir "$<TARGET_FILE_DIR:${PROJECT_NAME}>")
# specific order: dependents before dependencies
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_dependencies(ament_cmake)
ament_export_dependencies(rcl_interfaces)
ament_export_dependencies(rcutils)
ament_export_dependencies(rmw)
ament_export_dependencies(rmw_implementation)
ament_export_dependencies(rmw)
ament_export_dependencies(rcutils)
ament_export_dependencies(rosidl_generator_c)
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()

View file

@ -40,9 +40,10 @@ add_library(
rcl_lifecycle
${rcl_lifecycle_sources})
# specific order: dependents before dependencies
ament_target_dependencies(rcl_lifecycle
"lifecycle_msgs"
"rcl"
"lifecycle_msgs"
"rcutils"
)
@ -94,10 +95,13 @@ if(BUILD_TESTING)
endif()
endif()
ament_export_dependencies(ament_cmake)
ament_export_dependencies(lifecycle_msgs)
# specific order: dependents before dependencies
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_dependencies(ament_cmake)
ament_export_dependencies(rcl)
ament_export_dependencies(lifecycle_msgs)
ament_export_dependencies(rcutils)
ament_package()
install(