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

Revert "Bundle and ensure the exportation of rosidl generated targets (#601)" #611

Merged
merged 1 commit into from
Aug 9, 2021
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
7 changes: 0 additions & 7 deletions rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,6 @@ macro(rosidl_generate_interfaces target)
)

if(NOT _ARG_SKIP_INSTALL)
# Ensure exported targets are imported before first use in downstream packages.
# This hook registers the ament_export_targets() extension, which populates
# ${PROJECT_NAME}_CONFIG_EXTRAS upon ament_package() invocation. It is crucial
# that ament_export_targets() configuration extras are found and included before
# any other configuration extras that make use of imported targets.
_ament_cmake_export_targets_register_package_hook()
if(NOT _ARG_SKIP_GROUP_MEMBERSHIP_CHECK)
set(_group_name "rosidl_interface_packages")
if(NOT _AMENT_PACKAGE_NAME)
Expand Down Expand Up @@ -307,7 +301,6 @@ macro(rosidl_generate_interfaces target)
endif()

if(NOT _ARG_SKIP_INSTALL)
ament_export_targets(${rosidl_generate_interfaces_TARGET})
foreach(_idl_tuple ${_idl_tuples})
string(REGEX REPLACE ":([^:]*)$" ";\\1" _idl_list "${_idl_tuple}")
list(GET _idl_list 1 _idl_relpath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
)
endif()
ament_export_libraries(${rosidl_generate_interfaces_TARGET}${_target_suffix})
ament_export_targets(${rosidl_generate_interfaces_TARGET}${_target_suffix})
install(
TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix}
EXPORT ${rosidl_generate_interfaces_TARGET}
EXPORT ${rosidl_generate_interfaces_TARGET}${_target_suffix}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL)

install(
TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix}
EXPORT ${rosidl_generate_interfaces_TARGET}
EXPORT ${rosidl_generate_interfaces_TARGET}${_target_suffix}
)
ament_export_targets(${rosidl_generate_interfaces_TARGET}${_target_suffix})
endif()

if(BUILD_TESTING AND rosidl_generate_interfaces_ADD_LINTER_TESTS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,14 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
endif()
install(
TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix}
EXPORT ${rosidl_generate_interfaces_TARGET}
EXPORT ${rosidl_generate_interfaces_TARGET}${_target_suffix}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
rosidl_export_typesupport_targets(${_target_suffix}
${rosidl_generate_interfaces_TARGET}${_target_suffix})
ament_export_targets(${rosidl_generate_interfaces_TARGET}${_target_suffix})
endif()

if(BUILD_TESTING AND rosidl_generate_interfaces_ADD_LINTER_TESTS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
COMPILE_OPTIONS -Wall -Wextra -Wpedantic
)
endif()
target_link_libraries(
${rosidl_generate_interfaces_TARGET}${_target_suffix}
${rosidl_generate_interfaces_TARGET}__rosidl_generator_cpp)
target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp>"
)
ament_target_dependencies(${rosidl_generate_interfaces_TARGET}${_target_suffix}
"rosidl_runtime_c"
"rosidl_typesupport_interface"
Expand Down Expand Up @@ -134,13 +135,14 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
endif()
install(
TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix}
EXPORT ${rosidl_generate_interfaces_TARGET}
EXPORT ${rosidl_generate_interfaces_TARGET}${_target_suffix}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
rosidl_export_typesupport_targets(${_target_suffix}
${rosidl_generate_interfaces_TARGET}${_target_suffix})
ament_export_targets(${rosidl_generate_interfaces_TARGET}${_target_suffix})
endif()

if(BUILD_TESTING AND rosidl_generate_interfaces_ADD_LINTER_TESTS)
Expand Down