From 2ccd7b931f3bc392f1f3579a2867912b84835ab4 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Mon, 23 Sep 2019 11:41:41 +0200 Subject: CMake Build: Use find_package(PythonInterp) instead of "python" I had python3 installed on Windows, which doesn't have python as executable. find_package(PythonInterp) finds the right executable and it simply works. Change-Id: I69bf8e4dfbe29de56109fe1927569000d710c3f5 Reviewed-by: Alexandru Croitor --- cmake/QtDeclarativeSetup.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/QtDeclarativeSetup.cmake b/cmake/QtDeclarativeSetup.cmake index 91c1a3fc01..2cd6f56127 100644 --- a/cmake/QtDeclarativeSetup.cmake +++ b/cmake/QtDeclarativeSetup.cmake @@ -24,6 +24,7 @@ function(qt_declarative_write_tag_header target_name) CONTENT "${compile_hash_contents}") endfunction() +find_package(PythonInterp REQUIRED) # Generate a header file containing a regular expression jit table. function(qt_declarative_generate_reg_exp_jit_tables consuming_target) @@ -39,7 +40,7 @@ function(qt_declarative_generate_reg_exp_jit_tables consuming_target) add_custom_command( OUTPUT "${output_file}" - COMMAND python ${retgen_script_file} ${output_file} + COMMAND "${PYTHON_EXECUTABLE}" ${retgen_script_file} ${output_file} MAIN_DEPENDENCY ${retgen_script_file} ) target_sources(${consuming_target} PRIVATE ${output_file}) -- cgit v1.2.3