File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -1895,6 +1895,7 @@ endif
1895
1895
1896
1896
ifeq ($(HAVE_SPIRV_CROSS), 1)
1897
1897
DEFINES += -DHAVE_SPIRV_CROSS
1898
+ ifeq ($(HAVE_BUILTINSPIRV_CROSS), 1)
1898
1899
INCLUDE_DIRS += -I$(DEPS_DIR)/SPIRV-Cross
1899
1900
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cross.o
1900
1901
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cfg.o
@@ -1903,6 +1904,13 @@ ifeq ($(HAVE_SPIRV_CROSS), 1)
1903
1904
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_msl.o
1904
1905
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_parser.o
1905
1906
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cross_parsed_ir.o
1907
+ else
1908
+ CXXFLAGS += $(SPIRV_CROSS_CFLAGS)
1909
+ LIBS += -lspirv-cross-core \
1910
+ -lspirv-cross-glsl \
1911
+ -lspirv-cross-reflect \
1912
+ -lspirv-cross-msl
1913
+ endif
1906
1914
endif
1907
1915
1908
1916
ifeq ($(WANT_WGL), 1)
Original file line number Diff line number Diff line change @@ -662,6 +662,7 @@ check_enabled CXX GLSLANG glslang 'The C++ compiler is' false
662
662
check_enabled CXX SPIRV_CROSS SPIRV-Cross ' The C++ compiler is' false
663
663
664
664
check_enabled GLSLANG BUILTINGLSLANG ' builtin glslang' ' glslang is' true
665
+ check_enabled SPIRV_CROSS BUILTINSPIRV_CROSS ' builtin spirv-cross' ' spirv-cross is' true
665
666
666
667
if [ " $HAVE_GLSLANG " != no ]; then
667
668
check_header cxx GLSLANG \
@@ -694,6 +695,27 @@ if [ "$HAVE_GLSLANG" != no ]; then
694
695
fi
695
696
fi
696
697
698
+ if [ " $HAVE_SPIRV_CROSS " != no ]; then
699
+ check_lib cxx SPIRV_CROSS -lspirv-cross-core ' ' ' ' ' spirv_cross.hpp' ' spirv_cross'
700
+ check_lib cxx SPIRV_CROSS_GLSL -lspirv-cross-glsl
701
+ check_lib cxx SPIRV_CROSS_MSL -lspirv-cross-msl
702
+ check_lib cxx SPIRV_CROSS_REFLECT -lspirv-cross-reflect
703
+ if [ " $HAVE_SPIRV_CROSS " = no ] ||
704
+ [ " $HAVE_SPIRV_CROSS_GLSL " = no ] ||
705
+ [ " $HAVE_SPIRV_CROSS_MSL " = no ] ||
706
+ [ " $HAVE_SPIRV_CROSS_REFLECT " = no ]; then
707
+ if [ " $HAVE_BUILTINSPIRV_CROSS " != yes ]; then
708
+ die : " Notice: System spirv-cross libraries not found, \
709
+ disabling spirv-cross support"
710
+ HAVE_SPIRV_CROSS=no
711
+ else
712
+ HAVE_SPIRV_CROSS=yes
713
+ fi
714
+ else
715
+ HAVE_SPIRV_CROSS=yes
716
+ fi
717
+ fi
718
+
697
719
if [ " $HAVE_CRTSWITCHRES " != no ]; then
698
720
if [ " $HAVE_CXX11 " = ' no' ]; then
699
721
HAVE_CRTSWITCHRES=no
Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ C89_GLSLANG=no
194
194
HAVE_BUILTINGLSLANG=auto # Bake in glslang support
195
195
C89_BUILTINGLSLANG=no
196
196
HAVE_SPIRV_CROSS=auto # SPIRV-Cross support (requires C++11)
197
+ HAVE_BUILTINSPIRV_CROSS=auto # Use bundled SPIRV-Cross source
197
198
C89_SPIRV_CROSS=no
198
199
HAVE_METAL=no # Metal support (macOS-only)
199
200
C89_METAL=no
You can’t perform that action at this time.
0 commit comments