From 52f786b9238aa7c491a1580b1d29895df8d2c02f Mon Sep 17 00:00:00 2001 From: oleg Date: Fri, 8 Jan 2021 10:05:31 +0300 Subject: [PATCH] Search correct python interpeter in case missing default "python" --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0200d3a..773cbf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,7 @@ else() endif() # Generate source from the bindings file +find_package(PythonInterp REQUIRED) if(GENERATE_TEMPLATE_GET_NODE) set(GENERATE_BINDING_PARAMETERS "True") else() @@ -140,7 +141,7 @@ else() endif() message(STATUS "Generating Bindings") -execute_process(COMMAND "python" "-c" "import binding_generator; binding_generator.generate_bindings(\"${GODOT_CUSTOM_API_FILE}\", ${GENERATE_BINDING_PARAMETERS})" +execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import binding_generator; binding_generator.generate_bindings(\"${GODOT_CUSTOM_API_FILE}\", ${GENERATE_BINDING_PARAMETERS})" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULT_VARIABLE GENERATION_RESULT OUTPUT_VARIABLE GENERATION_OUTPUT)