Enable Vulkan on 64 bit architectures only
authorTimo Röhling <roehling@debian.org>
Thu, 27 Jan 2022 11:38:59 +0000 (12:38 +0100)
committerTimo Röhling <roehling@debian.org>
Thu, 27 Jan 2022 11:38:59 +0000 (12:38 +0100)
Filament assumes that VkSurfaceKHR is a pointer type, which is
only true on 64 bit architectures.

Gbp-Dch: full

debian/rules

index 60fabc301a9b395c0cf3799dad21ef4baf72c012..5fec826d2a1196277ca4e93b9b886fccb553c606 100755 (executable)
@@ -8,6 +8,13 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+all future=+lfs
 FILAMENT_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/[+~]dfsg[0-9]*$$//')
 FILAMENT_SOVERSION := $(shell echo $(FILAMENT_VERSION) | cut -d. -f1,2)
 
+# Filament assumes that VkSurfaceKHR is a pointer type, which is only true on 64 bit
+ifeq ($(DEB_HOST_ARCH_BITS),64)
+SUPPORTS_VULKAN = ON
+else
+SUPPORTS_VULKAN = OFF
+endif
+
 %:
        dh $@
 
@@ -18,6 +25,7 @@ override_dh_auto_configure:
                -DFILAMENT_SKIP_SAMPLES=ON \
                -DFILAMENT_ENABLE_JAVA=OFF \
                -DUSE_STATIC_LIBCXX=OFF \
+               -DFILAMENT_SUPPORTS_VULKAN=$(SUPPORTS_VULKAN) \
                -DFILAMENT_VERSION=$(FILAMENT_VERSION) \
                -DFILAMENT_SOVERSION=$(FILAMENT_SOVERSION) \
                -DFILAMENT_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \