Skip to content

Commit 30db879

Browse files
committed
Use python_interpreter_config to silence CMP0087 warning
Signed-off-by: Robert Haschke <[email protected]>
1 parent cc7ad4e commit 30db879

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ament_cmake_python/cmake/ament_python_install_package.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,10 @@ setup(
161161
)
162162

163163
# generate/install entry-point console scripts
164+
get_executable_path(python_interpreter_config Python3::Interpreter CONFIGURE)
164165
foreach(_dest ${ARG_SCRIPTS_DESTINATION})
165166
get_filename_component(ABS_SCRIPTS_DESTINATION "${_dest}" ABSOLUTE BASE_DIR "${CMAKE_INSTALL_PREFIX}")
166-
install(CODE "execute_process(COMMAND ${python_interpreter} setup.py install_scripts --install-dir \"${ABS_SCRIPTS_DESTINATION}\"
167+
install(CODE "execute_process(COMMAND \"${python_interpreter_config}\" setup.py install_scripts --install-dir \"${ABS_SCRIPTS_DESTINATION}\"
167168
WORKING_DIRECTORY \"${build_dir}\")")
168169
endforeach()
169170

@@ -175,7 +176,6 @@ setup(
175176
)
176177

177178
if(NOT ARG_SKIP_COMPILE)
178-
get_executable_path(python_interpreter_config Python3::Interpreter CONFIGURE)
179179
# compile Python files
180180
install(CODE
181181
"execute_process(

0 commit comments

Comments
 (0)