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

make rmw_dds_common use rosidl_generator_interfaces normally #12

Merged
merged 5 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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
34 changes: 18 additions & 16 deletions rmw_dds_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,53 @@ find_package(ament_cmake REQUIRED)
find_package(rcpputils REQUIRED)
find_package(rcutils REQUIRED)
find_package(rmw REQUIRED)
find_package(rmw_dds_common_generators REQUIRED)
find_package(rosidl_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)

ament_export_dependencies(ament_cmake_core)
ament_export_dependencies(rcpputils)
ament_export_dependencies(rcutils)
ament_export_dependencies(rmw)
ament_export_dependencies(rosidl_runtime_cpp)
ament_export_dependencies(rosidl_default_runtime)

rosidl_generate_interfaces(
${PROJECT_NAME}_interfaces
"msg/Gid.idl"
"msg/NodeEntitiesInfo.idl"
"msg/ParticipantEntitiesInfo.idl"
SKIP_GROUP_MEMBERSHIP_CHECK
${PROJECT_NAME}
"msg/Gid.msg"
"msg/NodeEntitiesInfo.msg"
"msg/ParticipantEntitiesInfo.msg"
)

add_library(${PROJECT_NAME} SHARED
add_library(${PROJECT_NAME}_library SHARED
src/gid_utils.cpp
src/graph_cache.cpp)
ament_target_dependencies(${PROJECT_NAME}
set_target_properties(${PROJECT_NAME}_library
PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
ament_target_dependencies(${PROJECT_NAME}_library
"rcpputils"
"rcutils"
"rmw"
"rosidl_runtime_cpp")
add_dependencies(${PROJECT_NAME}
${PROJECT_NAME}_interfaces)
target_include_directories(${PROJECT_NAME} PUBLIC
add_dependencies(${PROJECT_NAME}_library
${PROJECT_NAME})
target_include_directories(${PROJECT_NAME}_library PUBLIC
include
${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_c
${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp)

# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(${PROJECT_NAME}
target_compile_definitions(${PROJECT_NAME}_library
PRIVATE "RMW_DDS_COMMON_BUILDING_LIBRARY")

install(
TARGETS ${PROJECT_NAME}
TARGETS ${PROJECT_NAME}_library
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_libraries(${PROJECT_NAME}_library)

install(
DIRECTORY include/
Expand All @@ -72,7 +74,7 @@ if(BUILD_TESTING)

ament_add_gmock(test_graph_cache test/test_graph_cache.cpp)
if(TARGET test_graph_cache)
target_link_libraries(test_graph_cache ${PROJECT_NAME})
target_link_libraries(test_graph_cache ${PROJECT_NAME}_library)
endif()
endif()

Expand Down
8 changes: 0 additions & 8 deletions rmw_dds_common/msg/Gid.idl

This file was deleted.

1 change: 1 addition & 0 deletions rmw_dds_common/msg/Gid.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
char[24] data
12 changes: 0 additions & 12 deletions rmw_dds_common/msg/NodeEntitiesInfo.idl

This file was deleted.

4 changes: 4 additions & 0 deletions rmw_dds_common/msg/NodeEntitiesInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
string<=256 node_namespace
string<=256 node_name
Gid[] reader_gid_seq
Gid[] writer_gid_seq
14 changes: 0 additions & 14 deletions rmw_dds_common/msg/ParticipantEntitiesInfo.idl

This file was deleted.

2 changes: 2 additions & 0 deletions rmw_dds_common/msg/ParticipantEntitiesInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Gid gid
NodeEntitiesInfo[] node_entities_info_seq
6 changes: 5 additions & 1 deletion rmw_dds_common/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
<author>Ivan Paunovic</author>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>rmw_dds_common_generators</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>

<exec_depend>rosidl_default_runtime</exec_depend>

<depend>rcutils</depend>
<depend>rcpputils</depend>
Expand All @@ -20,6 +22,8 @@
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
19 changes: 0 additions & 19 deletions rmw_dds_common_generators/CMakeLists.txt

This file was deleted.

31 changes: 0 additions & 31 deletions rmw_dds_common_generators/package.xml

This file was deleted.

This file was deleted.