diff --git a/rosidl_generator_rs/cmake/custom_command.cmake b/rosidl_generator_rs/cmake/custom_command.cmake index d16ccd8..8bba0ab 100644 --- a/rosidl_generator_rs/cmake/custom_command.cmake +++ b/rosidl_generator_rs/cmake/custom_command.cmake @@ -12,6 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +find_package(Python3 REQUIRED COMPONENTS Interpreter) +set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) + add_custom_command( OUTPUT ${_generated_common_rs_files}