Skip to content

Commit 301450b

Browse files
committed
attempt to use system glslc first before using bundled glslc
1 parent 38ce7e0 commit 301450b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -714,13 +714,17 @@ ifeq ($(OS),Windows_NT)
714714
@echo 'Vulkan Shaders Rebuilt for Windows...'
715715
else
716716
@echo 'Now rebuilding vulkan shaders for Linux...'
717-
@chmod +x vulkan-shaders-gen glslc-linux
718-
@echo 'Checking if bundled glslc-linux binary is usable...'
717+
@echo 'Checking if system glslc-linux binary is usable...'
719718
@GLSLC_BIN=$$( \
720-
if [ -x ./glslc-linux ] && ./glslc-linux --version 2>/dev/null | grep -q "glslang"; then \
721-
echo "./glslc-linux"; \
722-
elif command -v glslc >/dev/null 2>&1; then \
719+
if command -v glslc >/dev/null 2>&1 && glslc --version 2>/dev/null | grep -q "glslang"; then \
723720
echo "glslc"; \
721+
elif [ -x ./glslc-linux ]; then \
722+
chmod +x ./glslc-linux; \
723+
if ./glslc-linux --version 2>/dev/null | grep -q "glslang"; then \
724+
echo "./glslc-linux"; \
725+
else \
726+
echo ""; \
727+
fi; \
724728
else \
725729
echo ""; \
726730
fi); \

0 commit comments

Comments
 (0)