diff options
Diffstat (limited to 'examples/samplebinding/CMakeLists.txt')
-rw-r--r-- | examples/samplebinding/CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/samplebinding/CMakeLists.txt b/examples/samplebinding/CMakeLists.txt index f5212c449..3852ed36f 100644 --- a/examples/samplebinding/CMakeLists.txt +++ b/examples/samplebinding/CMakeLists.txt @@ -40,7 +40,11 @@ set(generated_sources # ================================== Shiboken detection ====================================== - +# Use provided python interpreter if given. +if(NOT python_interpreter) + find_program(python_interpreter "python") +endif() +message(STATUS "Using python interpreter: ${python_interpreter}") # Macro to get various pyside / python include / link flags and paths. # Uses the not entirely supported utils/pyside2_config.py file. @@ -52,7 +56,8 @@ macro(pyside2_config option output_var) endif() execute_process( - COMMAND python "${CMAKE_SOURCE_DIR}/../utils/pyside2_config.py" ${option} + COMMAND ${python_interpreter} "${CMAKE_SOURCE_DIR}/../utils/pyside2_config.py" + ${option} OUTPUT_VARIABLE ${output_var} OUTPUT_STRIP_TRAILING_WHITESPACE) |