aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-09-23 11:41:41 +0200
committerCristian Adam <cristian.adam@qt.io>2019-09-23 10:01:03 +0000
commit2ccd7b931f3bc392f1f3579a2867912b84835ab4 (patch)
tree145c35df7484b25a4ecdf17e792e9cef99021438 /cmake
parentbf58a1cc043c72c6df97b4c00ce7f90c83237f69 (diff)
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtDeclarativeSetup.cmake3
1 files changed, 2 insertions, 1 deletions
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})