Skip to content

Commit

Permalink
win64-cross: Add vulkan-headers, spirv-{headers,tools}, glslang
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed Jul 21, 2024
1 parent 2f89811 commit c6bad86
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ubuntu-win64-cross/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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-
Expand Down
25 changes: 25 additions & 0 deletions ubuntu-win64-cross/glslang.mk
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions ubuntu-win64-cross/spirv-headers.mk
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions ubuntu-win64-cross/spirv-tools.mk
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions ubuntu-win64-cross/vulkan-headers.mk
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c6bad86

Please sign in to comment.