diff options
Diffstat (limited to 'examples/scriptableapplication/CMakeLists.txt')
-rw-r--r-- | examples/scriptableapplication/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/scriptableapplication/CMakeLists.txt b/examples/scriptableapplication/CMakeLists.txt index 71e7869ab..215d08961 100644 --- a/examples/scriptableapplication/CMakeLists.txt +++ b/examples/scriptableapplication/CMakeLists.txt @@ -14,6 +14,12 @@ set(CMAKE_CXX_STANDARD 11) # Find required Qt packages. find_package(Qt5 5.9 REQUIRED COMPONENTS Core Gui Widgets) +# 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. macro(pyside2_config option output_var) if(${ARGC} GREATER 2) @@ -23,7 +29,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) |