File tree 1 file changed +17
-1
lines changed
rosidl_generator_py/cmake
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,23 @@ rosidl_write_generator_arguments(
121
121
)
122
122
123
123
if (NOT rosidl_generate_interfaces_SKIP_INSTALL)
124
- ament_python_install_package(${PROJECT_NAME} PACKAGE_DIR "${_output_path} " )
124
+ if (${PROJECT_NAME} IN_LIST AMENT_CMAKE_PYTHON_INSTALL_INSTALLED_NAMES)
125
+ ament_python_install_module("${_output_path} /__init__.py"
126
+ DESTINATION_SUFFIX "${PROJECT_NAME} "
127
+ )
128
+
129
+ # TODO(esteve): replace this with ament_python_install_module and allow a list
130
+ # of modules to be passed instead of iterating over _generated_py_files
131
+ # See https://github.com/ros2/rosidl/issues/89
132
+ foreach (_generated_py_dir ${_generated_py_dirs} )
133
+ install (DIRECTORY "${_output_path} /${_generated_py_dir} /"
134
+ DESTINATION "${PYTHON_INSTALL_DIR} /${PROJECT_NAME} /${_generated_py_dir} "
135
+ PATTERN "*.py"
136
+ )
137
+ endforeach ()
138
+ else ()
139
+ ament_python_install_package(${PROJECT_NAME} PACKAGE_DIR "${_output_path} " )
140
+ endif ()
125
141
endif ()
126
142
127
143
set (_target_suffix "__py" )
You can’t perform that action at this time.
0 commit comments