mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Add support for vendored spirv-reflect
This allows build-archives.sh to fall back to vendored spirv-reflect if it can't be found in PATH. Also update error messages to suggest additional alternatives. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Vendored
+10
-2
@@ -43,10 +43,18 @@ if [ "${BUILD_SHADERS}" = true ]; then
|
||||
PYTHON=${PYTHON:=$(command -v python3 || command -v python || true)}
|
||||
GLSLC=${GLSLC:=$(command -v glslc || true)}
|
||||
SPIRV_REFLECT=${SPIRV_REFLECT:=$(command -v spirv-reflect || true)}
|
||||
if [ -e "$(realpath libraries/source/spirv-reflect/bin/spirv-reflect || true)" ]; then
|
||||
: "${SPIRV_REFLECT:=$(realpath libraries/source/spirv-reflect/bin/spirv-reflect || true)}"
|
||||
fi
|
||||
export SPIRV_REFLECT
|
||||
|
||||
[ -n "${PYTHON}" ] || die "Error: python is not available. Install it before proceeding."
|
||||
[ -n "${GLSLC}" ] || die "Error: glslc is not available. Install it with the Vulkan SDK before proceeding."
|
||||
[ -n "${SPIRV_REFLECT}" ] || die "Error: spirv-reflect is not available. Install it with the Vulkan SDK before proceeding."
|
||||
[ -n "${GLSLC}" ] ||
|
||||
die "Error: glslc is not available." \
|
||||
" Install it with the Vulkan SDK or shaderc package before proceeding."
|
||||
[ -n "${SPIRV_REFLECT}" ] ||
|
||||
die "Error: spirv-reflect is not available." \
|
||||
" Install it with the Vulkan SDK or build vendored spirv-reflect before proceeding."
|
||||
|
||||
cd source/tools/spirv || die
|
||||
|
||||
|
||||
Reference in New Issue
Block a user