Merge pull request #492 from o01eg/fix-python-detect

Search correct python interpeter in case missing default "python"
pull/400/head
George Marques 2021-03-01 11:47:07 -03:00 committed by GitHub
commit 87f7e061a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -133,6 +133,7 @@ else()
endif() endif()
# Generate source from the bindings file # Generate source from the bindings file
find_package(PythonInterp REQUIRED)
if(GENERATE_TEMPLATE_GET_NODE) if(GENERATE_TEMPLATE_GET_NODE)
set(GENERATE_BINDING_PARAMETERS "True") set(GENERATE_BINDING_PARAMETERS "True")
else() else()
@ -140,7 +141,7 @@ else()
endif() endif()
message(STATUS "Generating Bindings") 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} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GENERATION_RESULT RESULT_VARIABLE GENERATION_RESULT
OUTPUT_VARIABLE GENERATION_OUTPUT) OUTPUT_VARIABLE GENERATION_OUTPUT)