From c6bad867390403f87334d3cc73c8a407a92d400b Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Sun, 21 Jul 2024 15:25:02 -0700 Subject: [PATCH] win64-cross: Add vulkan-headers, spirv-{headers,tools}, glslang --- ubuntu-win64-cross/Dockerfile | 13 +++++++++++++ ubuntu-win64-cross/glslang.mk | 25 +++++++++++++++++++++++++ ubuntu-win64-cross/spirv-headers.mk | 16 ++++++++++++++++ ubuntu-win64-cross/spirv-tools.mk | 27 +++++++++++++++++++++++++++ ubuntu-win64-cross/vulkan-headers.mk | 16 ++++++++++++++++ 5 files changed, 97 insertions(+) create mode 100644 ubuntu-win64-cross/glslang.mk create mode 100644 ubuntu-win64-cross/spirv-headers.mk create mode 100644 ubuntu-win64-cross/spirv-tools.mk create mode 100644 ubuntu-win64-cross/vulkan-headers.mk diff --git a/ubuntu-win64-cross/Dockerfile b/ubuntu-win64-cross/Dockerfile index ba71d05386..5f71cde7b4 100644 --- a/ubuntu-win64-cross/Dockerfile +++ b/ubuntu-win64-cross/Dockerfile @@ -72,6 +72,19 @@ RUN V=1 MXE_VERBOSE=1 make -C /opt/mxe \ MXE_PLUGIN_DIRS=plugins/gcc13 \ sdl2 +COPY vulkan-headers.mk \ + spirv-headers.mk \ + spirv-tools.mk \ + glslang.mk \ + /opt/mxe/src/ +RUN V=1 MXE_VERBOSE=1 make -C /opt/mxe \ + MXE_TARGETS=x86_64-w64-mingw32.static \ + MXE_PLUGIN_DIRS=plugins/gcc13 \ + vulkan-headers \ + spirv-headers \ + spirv-tools \ + glslang + RUN find /opt/mxe/usr -executable -type f -exec chmod a+x {} \; ENV CROSSPREFIX=x86_64-w64-mingw32.static- diff --git a/ubuntu-win64-cross/glslang.mk b/ubuntu-win64-cross/glslang.mk new file mode 100644 index 0000000000..3df2824622 --- /dev/null +++ b/ubuntu-win64-cross/glslang.mk @@ -0,0 +1,25 @@ +PKG := glslang +$(PKG)_WEBSITE := https://github.com/KhronosGroup/glslang +$(PKG)_DESCR := glslang +$(PKG)_IGNORE := +$(PKG)_VERSION := 14.3.0 +$(PKG)_SUBDIR := glslang-$($(PKG)_VERSION) +$(PKG)_FILE := glslang-$($(PKG)_VERSION).tar.gz +$(PKG)_CHECKSUM := be6339048e20280938d9cb399fcdd06e04f8654d43e170e8cce5a56c9a754284 +$(PKG)_URL := https://github.com/KhronosGroup/glslang/archive/refs/tags/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := cc spirv-tools + +define $(PKG)_BUILD + $(TARGET)-cmake -B'$(BUILD_DIR)' -S'$(SOURCE_DIR)' \ + -G"Ninja" \ + -DBUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL) \ + -DENABLE_GLSLANG_BINARIES=OFF \ + -DGLSLANG_TESTS=OFF \ + -DBUILD_EXTERNAL=OFF \ + -DALLOW_EXTERNAL_SPIRV_TOOLS=ON \ + -DVERBOSE=1 + $(TARGET)-cmake --build '$(BUILD_DIR)' + $(TARGET)-cmake --install '$(BUILD_DIR)' +endef + +# FIXME: Shared libs diff --git a/ubuntu-win64-cross/spirv-headers.mk b/ubuntu-win64-cross/spirv-headers.mk new file mode 100644 index 0000000000..966540762f --- /dev/null +++ b/ubuntu-win64-cross/spirv-headers.mk @@ -0,0 +1,16 @@ +PKG := spirv-headers +$(PKG)_WEBSITE := https://github.com/KhronosGroup/SPIRV-Headers +$(PKG)_DESCR := SPIRV-Headers +$(PKG)_IGNORE := +$(PKG)_VERSION := vulkan-sdk-1.3.283.0 +$(PKG)_SUBDIR := SPIRV-Headers-$($(PKG)_VERSION) +$(PKG)_FILE := spirv-headers-$($(PKG)_VERSION).tar.gz +$(PKG)_CHECKSUM := a68a25996268841073c01514df7bab8f64e2db1945944b45087e5c40eed12cb9 +$(PKG)_URL := https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := cc + +define $(PKG)_BUILD + $(TARGET)-cmake -B'$(BUILD_DIR)' -S'$(SOURCE_DIR)' + $(TARGET)-cmake --build '$(BUILD_DIR)' + $(TARGET)-cmake --install '$(BUILD_DIR)' +endef diff --git a/ubuntu-win64-cross/spirv-tools.mk b/ubuntu-win64-cross/spirv-tools.mk new file mode 100644 index 0000000000..c19c251fcb --- /dev/null +++ b/ubuntu-win64-cross/spirv-tools.mk @@ -0,0 +1,27 @@ +PKG := spirv-tools +$(PKG)_WEBSITE := https://github.com/KhronosGroup/SPIRV-Tools +$(PKG)_DESCR := SPIRV-Tools +$(PKG)_IGNORE := +$(PKG)_VERSION := vulkan-sdk-1.3.283.0 +$(PKG)_SUBDIR := SPIRV-Tools-$($(PKG)_VERSION) +$(PKG)_FILE := spirv-tools-$($(PKG)_VERSION).tar.gz +$(PKG)_CHECKSUM := 5e2e5158bdd7442f9e01e13b5b33417b06cddff4965c9c19aab9763ab3603aae +$(PKG)_URL := https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := cc spirv-headers + +define $(PKG)_BUILD + $(TARGET)-cmake -B'$(BUILD_DIR)' -S'$(SOURCE_DIR)' \ + -G"Ninja" \ + -DBUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL) \ + -DSPIRV-Headers_SOURCE_DIR=$(PREFIX)/$(TARGET) \ + -DSPIRV_WERROR=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + -DSPIRV_TOOLS_BUILD_STATIC=ON \ + -DSPIRV_SKIP_EXECUTABLES=ON \ + -DSPIRV_SKIP_TESTS=ON \ + -DVERBOSE=1 + $(TARGET)-cmake --build '$(BUILD_DIR)' + $(TARGET)-cmake --install '$(BUILD_DIR)' +endef + +# FIXME: Shared libs diff --git a/ubuntu-win64-cross/vulkan-headers.mk b/ubuntu-win64-cross/vulkan-headers.mk new file mode 100644 index 0000000000..9cb88ac45c --- /dev/null +++ b/ubuntu-win64-cross/vulkan-headers.mk @@ -0,0 +1,16 @@ +PKG := vulkan-headers +$(PKG)_WEBSITE := https://github.com/KhronosGroup/Vulkan-Headers +$(PKG)_DESCR := Vulkan-Headers +$(PKG)_IGNORE := +$(PKG)_VERSION := vulkan-sdk-1.3.283.0 +$(PKG)_SUBDIR := Vulkan-Headers-$($(PKG)_VERSION) +$(PKG)_FILE := vulkan-headers-$($(PKG)_VERSION).tar.gz +$(PKG)_CHECKSUM := cf54a812911b4e3e4ff15716c222a8fb9a87c2771c0b86060cb0ca2570ea55a9 +$(PKG)_URL := https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := cc + +define $(PKG)_BUILD + $(TARGET)-cmake -B'$(BUILD_DIR)' -S'$(SOURCE_DIR)' + $(TARGET)-cmake --build '$(BUILD_DIR)' + $(TARGET)-cmake --install '$(BUILD_DIR)' +endef