Skip to content

Commit 63b2d68

Browse files
authored
Declare rust_packages only when installing Rust IDL bindings (#380)
Signed-off-by: Michael X. Grey <[email protected]>
1 parent 9b59a21 commit 63b2d68

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cmake/rosidl_generator_rs_generate_interfaces.cmake

+1-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ file(MAKE_DIRECTORY "${_output_path}")
115115

116116
set(_target_suffix "__rs")
117117

118-
ament_index_register_resource("rust_packages")
119-
120-
121118
# needed to avoid multiple calls to the Rust generator trick copied from
122119
# https://github.com/ros2/rosidl/blob/master/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
123120
set(_subdir "${CMAKE_CURRENT_BINARY_DIR}/${rosidl_generate_interfaces_TARGET}${_target_suffix}")
@@ -137,6 +134,7 @@ set_property(
137134

138135
set(_rsext_suffix "__rsext")
139136
if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
137+
ament_index_register_resource("rust_packages")
140138
install(
141139
DIRECTORY "${_output_path}/rust"
142140
DESTINATION "share/${PROJECT_NAME}"

0 commit comments

Comments
 (0)