🔧 Let cmake find the python3 executable

This commit is contained in:
Edgar 2023-10-01 11:36:28 +02:00
parent e5edb54db1
commit 679f2fe5d6
No known key found for this signature in database
GPG key ID: 3C2E1F2C1C353131
2 changed files with 3 additions and 1 deletions

View file

@ -72,3 +72,5 @@ if (UNIX)
# This will need to be looked at closely before Linux can have a static build.
set(BUILD_SHARED_LIBS ON)
endif ()
find_package(Python3 REQUIRED)

View file

@ -438,7 +438,7 @@ macro(AUTOSCRIBE_SHADER_LIBS)
add_custom_command(
OUTPUT ${SCRIBED_SHADERS} ${SPIRV_SHADERS} ${REFLECTED_SHADERS}
COMMENT "Generating/updating shaders"
COMMAND python ${CMAKE_SOURCE_DIR}/tools/shadergen.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/shadergen.py
--commands ${AUTOSCRIBE_SHADERGEN_COMMANDS_FILE}
--glslang "${GLSLANG_DIR}/glslangValidator"
--scribe "${SCRIBE_DIR}/scribe"