Skip to content

Commit

Permalink
Merge pull request #492 from o01eg/fix-python-detect
Browse files Browse the repository at this point in the history
Search correct python interpeter in case missing default "python"
  • Loading branch information
vnen authored Mar 1, 2021
2 parents 6c56bfd + 52f786b commit 87f7e06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,15 @@ else()
endif()

# Generate source from the bindings file
find_package(PythonInterp REQUIRED)
if(GENERATE_TEMPLATE_GET_NODE)
set(GENERATE_BINDING_PARAMETERS "True")
else()
set(GENERATE_BINDING_PARAMETERS "False")
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)
Expand Down

0 comments on commit 87f7e06

Please sign in to comment.