Skip to content

Commit

Permalink
change export order for static linking (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas authored Mar 22, 2018
1 parent 5fa1b0e commit bad0f55
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
17 changes: 9 additions & 8 deletions rcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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()
Expand Down
10 changes: 7 additions & 3 deletions rcl_lifecycle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit bad0f55

Please sign in to comment.