Skip to content

Commit 2860e2d

Browse files
Feature: add depends flag for ament_python_install_package (#254)
Signed-off-by: = <elnadav12@gmail.com>
1 parent 3ce862f commit 2860e2d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,13 @@ rosidl_write_generator_arguments(
134134
TARGET_DEPENDENCIES ${target_dependencies}
135135
)
136136

137+
set(_target_suffix "__py")
138+
137139
if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
138-
ament_python_install_package(${PROJECT_NAME} PACKAGE_DIR "${_output_path}")
140+
ament_python_install_package(${PROJECT_NAME} PACKAGE_DIR "${_output_path}"
141+
DEPENDS ${rosidl_generate_interfaces_TARGET}${_target_suffix})
139142
endif()
140143

141-
set(_target_suffix "__py")
142-
143144
# move custom command into a subdirectory to avoid multiple invocations on Windows
144145
set(_subdir "${CMAKE_CURRENT_BINARY_DIR}/${rosidl_generate_interfaces_TARGET}${_target_suffix}")
145146
file(MAKE_DIRECTORY "${_subdir}")

0 commit comments

Comments
 (0)