Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into proposal/windowing-3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Dec 21, 2024
2 parents 35ab26e + e3f057d commit c940b96
Show file tree
Hide file tree
Showing 1,021 changed files with 333,027 additions and 10,601 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ updates:
schedule:
interval: weekly
day: thursday
groups:
All 2.X Dependencies:
patterns:
- "*"
- package-ecosystem: nuget
target-branch: develop/3.0
directory: "/"
schedule:
interval: weekly
day: thursday
groups:
All 3.0 Dependencies:
patterns:
- "*"
9 changes: 3 additions & 6 deletions .github/workflows/bindings-regeneration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
token: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
- name: Checkout submodules, configure git.
run: |
git -c submodule.third_party/git-hooks.update=none submodule update --init --recursive
# Keep this in sync with generator.json!
git -c submodule.third_party/git-hooks.update=none submodule update --init --depth 0 build/submodules/Vulkan-Headers build/submodules/Assimp build/submodules/SDL build/submodules/webgpu-headers build/submodules/dawn build/submodules/SPIRV-Headers build/submodules/SPIRV-Reflect build/submodules/SPIRV-Cross build/submodules/shaderc
git submodule update --init --depth 0 --recursive build/submodules/wgpu-native
git config --local user.email "[email protected]"
git config --local user.name "The Silk.NET Automaton"
- name: Setup .NET Core
Expand Down Expand Up @@ -44,11 +46,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.404
- name: Setup NUKE
run: dotnet tool install Nuke.GlobalTool --global
- name: Install Workloads
# TODO: This is slow. Maybe we can make a docker container with this already done?
run: dotnet workload install android ios maccatalyst
- uses: GuillaumeFalourd/[email protected]
name: Setup Windows 11 SDK
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/shaderc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
fail-fast: false
matrix:
env:
- os: ubuntu-latest
name: Linux
nuke_invoke: ./build.sh
- os: windows-2022
name: Windows
nuke_invoke: ./build.cmd
extras: ""
name: ${{ matrix.env.name }} Build
runs-on: ${{ matrix.env.os }}
steps:
Expand All @@ -43,6 +44,7 @@ jobs:
dotnet-version: |
6.0.201
7.0.*
8.0.*
- name: Build Shaderc
run: ${{ matrix.env.nuke_invoke }} Shaderc
env:
Expand Down
42 changes: 14 additions & 28 deletions .github/workflows/swiftshader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,17 @@ jobs:
matrix:
env:
- os: ubuntu-22.04
name: Linux
name: Linux x64
nuke_invoke: ./build.sh
extras: |
# We need to adjust APT sources for multiarch. Use the ones corresponding to
# Ubuntu 22.04 with appropriate `arch` values. ports.ubuntu.com is required
# for armhf and arm64.
sudo tee /etc/apt/sources.list << EOF
deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy main multiverse restricted universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy-backports main multiverse restricted universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy-security main multiverse restricted universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy-updates main multiverse restricted universe
deb [arch=arm64,armhf] http://ports.ubuntu.com jammy main multiverse restricted universe
deb [arch=arm64,armhf] http://ports.ubuntu.com jammy-backports main multiverse restricted universe
deb [arch=arm64,armhf] http://ports.ubuntu.com jammy-security main multiverse restricted universe
deb [arch=arm64,armhf] http://ports.ubuntu.com jammy-updates main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu jammy main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu jammy-backports main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu jammy-security main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu jammy-updates main multiverse restricted universe
EOF
sudo dpkg --add-architecture arm64
sudo dpkg --add-architecture armhf
sudo apt update
sudo apt install -y gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
sudo apt install -y g++-aarch64-linux-gnu g++-arm-linux-gnueabihf
for arch in amd64 arm64 armhf; do
sudo apt install -y libx11-xcb-dev:$arch
done
nuke_extra: --matrix-arg linux-x64
- os: ubuntu-22.04
name: Linux ARM32
nuke_invoke: ./build.sh
nuke_extra: --matrix-arg linux-arm
- os: ubuntu-22.04
name: Linux ARM64
nuke_invoke: ./build.sh
nuke_extra: --matrix-arg linux-arm64
- os: windows-2022
name: Windows
nuke_invoke: ./build.cmd
Expand Down Expand Up @@ -83,7 +66,10 @@ jobs:
dotnet-version: |
6.0.201
7.0.*
- name: Install Zig
if: ${{ matrix.env.os == 'ubuntu-22.04' }}
uses: goto-bus-stop/setup-zig@v2
- name: Build SwiftShader
run: ${{ matrix.env.nuke_invoke }} SwiftShader
run: ${{ matrix.env.nuke_invoke }} SwiftShader ${{ matrix.env.nuke_extra }}
env:
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/vulkan-loader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
for arch in amd64 arm64 armhf; do
sudo apt install -y libx11-xcb-dev:$arch libxkbcommon-dev:$arch libwayland-dev:$arch libxrandr-dev:$arch
done
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20240417/llvm-mingw-20240417-msvcrt-ubuntu-20.04-x86_64.tar.xz
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20241015/llvm-mingw-20241015-msvcrt-ubuntu-20.04-x86_64.tar.xz
sudo mkdir /opt/llvm-mingw-msvcrt
sudo tar xf llvm-mingw-20240417-msvcrt-ubuntu-20.04-x86_64.tar.xz --strip-components 1 -C /opt/llvm-mingw-msvcrt
rm llvm-mingw-20240417-msvcrt-ubuntu-20.04-x86_64.tar.xz
sudo tar xf llvm-mingw-20241015-msvcrt-ubuntu-20.04-x86_64.tar.xz --strip-components 1 -C /opt/llvm-mingw-msvcrt
rm llvm-mingw-20241015-msvcrt-ubuntu-20.04-x86_64.tar.xz
- os: windows-2022
name: Windows
nuke_invoke: ./build.cmd
Expand Down
4 changes: 4 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"VSCode"
]
},
"MatrixArg": {
"type": "string",
"description": "Matrix job argument e.g. a RID for native builds"
},
"MsbuildProperties": {
"type": "array",
"description": "Extra properties passed to MSBuild commands",
Expand Down
15 changes: 15 additions & 0 deletions Silk.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.Assimp.Tests", "src\Assimp\Silk.NET.Assimp.Tests\Silk.NET.Assimp.Tests.csproj", "{12D0A556-7DDF-4902-8911-1DA3F6331149}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.Core.Tests", "src\Core\Silk.NET.Core.Tests\Silk.NET.Core.Tests.csproj", "{4D871493-0B88-477A-99A1-3E05561CFAD9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -3771,6 +3773,18 @@ Global
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x64.Build.0 = Release|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x86.ActiveCfg = Release|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x86.Build.0 = Release|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Debug|x64.ActiveCfg = Debug|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Debug|x64.Build.0 = Debug|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Debug|x86.ActiveCfg = Debug|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Debug|x86.Build.0 = Debug|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Release|Any CPU.Build.0 = Release|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Release|x64.ActiveCfg = Release|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Release|x64.Build.0 = Release|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Release|x86.ActiveCfg = Release|Any CPU
{4D871493-0B88-477A-99A1-3E05561CFAD9}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -4072,6 +4086,7 @@ Global
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
{12D0A556-7DDF-4902-8911-1DA3F6331149} = {6EADA376-E83F-40B7-9539-71DD17AEF7A4}
{4D871493-0B88-477A-99A1-3E05561CFAD9} = {0651C5EF-50AA-4598-8D9C-8F210ADD8490}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5273D7F-3334-48DF-94E3-41AE6816CD4D}
Expand Down
Binary file modified build/cache/assimp.json.gz
Binary file not shown.
Binary file modified build/cache/cl.json.gz
Binary file not shown.
Binary file modified build/cache/core.json.gz
Binary file not shown.
Binary file modified build/cache/d2d.json.gz
Binary file not shown.
Binary file modified build/cache/d3d11.json.gz
Binary file not shown.
Binary file modified build/cache/d3d12.json.gz
Binary file not shown.
Binary file modified build/cache/d3d9.json.gz
Binary file not shown.
Binary file modified build/cache/d3dcompiler.json.gz
Binary file not shown.
Binary file modified build/cache/dcomp.json.gz
Binary file not shown.
Binary file modified build/cache/dstorage.json.gz
Binary file not shown.
Binary file modified build/cache/dwrite.json.gz
Binary file not shown.
Binary file modified build/cache/dxc.json.gz
Binary file not shown.
Binary file modified build/cache/dxgi.json.gz
Binary file not shown.
Binary file modified build/cache/dxva.json.gz
Binary file not shown.
Binary file modified build/cache/gl.json.gz
Binary file not shown.
Binary file modified build/cache/glcore.json.gz
Binary file not shown.
Binary file modified build/cache/gles2.json.gz
Binary file not shown.
Binary file modified build/cache/openxr.json.gz
Binary file not shown.
Binary file modified build/cache/sdl.json.gz
Binary file not shown.
Binary file modified build/cache/shaderc.json.gz
Binary file not shown.
Binary file modified build/cache/spirv-cross.json.gz
Binary file not shown.
Binary file modified build/cache/spirv-reflect.json.gz
Binary file not shown.
Binary file modified build/cache/spirv.json.gz
Binary file not shown.
Binary file modified build/cache/vulkan.json.gz
Binary file not shown.
Binary file modified build/cache/vulkan_video.json.gz
Binary file not shown.
Binary file modified build/cache/webgpu.json.gz
Binary file not shown.
Binary file modified build/cache/wgl.json.gz
Binary file not shown.
Binary file modified build/cache/wic.json.gz
Binary file not shown.
Binary file modified build/cache/win32extras.json.gz
Binary file not shown.
Binary file modified build/cache/xaudio.json.gz
Binary file not shown.
Binary file modified build/cache/xinput.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/cmake/aarch64-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")

set(CMAKE_ASM_COMPILER "/usr/bin/aarch64-linux-gnu-as")
set(CMAKE_ASM_COMPILER "/usr/bin/aarch64-linux-gnu-gcc")
set(CMAKE_C_COMPILER "/usr/bin/aarch64-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/aarch64-linux-gnu-g++")

Expand Down
20 changes: 10 additions & 10 deletions build/cmake/aarch64-w64-mingw32.cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
set(CMAKE_SYSTEM_NAME "Windows")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")

set(CMAKE_ASM_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-as")
set(CMAKE_ASM_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-gcc")
set(CMAKE_C_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-gcc")
set(CMAKE_CXX_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-g++")
set(CMAKE_RC_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-windres")

set(CMAKE_ADDR2LINE "/usr/bin/aarch64-w64-mingw32-addr2line")
set(CMAKE_AR "/usr/bin/aarch64-w64-mingw32-ar")
set(CMAKE_DLLTOOL "/usr/bin/aarch64-w64-mingw32-dlltool")
set(CMAKE_ADDR2LINE "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-addr2line")
set(CMAKE_AR "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-ar")
set(CMAKE_DLLTOOL "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-dlltool")
set(CMAKE_LINKER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-ld")
set(CMAKE_NM "/usr/bin/aarch64-w64-mingw32-nm")
set(CMAKE_OBJCOPY "/usr/bin/aarch64-w64-mingw32-objcopy")
set(CMAKE_OBJDUMP "/usr/bin/aarch64-w64-mingw32-objdump")
set(CMAKE_RANLIB "/usr/bin/aarch64-w64-mingw32-ranlib")
set(CMAKE_READELF "/usr/bin/aarch64-w64-mingw32-readelf")
set(CMAKE_STRIP "/usr/bin/aarch64-w64-mingw32-strip")
set(CMAKE_NM "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-nm")
set(CMAKE_OBJCOPY "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-objcopy")
set(CMAKE_OBJDUMP "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-objdump")
set(CMAKE_RANLIB "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-ranlib")
set(CMAKE_READELF "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-readelf")
set(CMAKE_STRIP "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-strip")

set(CMAKE_FIND_ROOT_PATH "/opt/llvm-mingw-msvcrt/aarch64-w64-mingw32")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
Expand Down
2 changes: 1 addition & 1 deletion build/cmake/arm-linux-gnueabihf.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "armv7l")

set(CMAKE_ASM_COMPILER "/usr/bin/arm-linux-gnueabihf-as")
set(CMAKE_ASM_COMPILER "/usr/bin/arm-linux-gnueabihf-gcc")
set(CMAKE_C_COMPILER "/usr/bin/arm-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/arm-linux-gnueabihf-g++")

Expand Down
36 changes: 36 additions & 0 deletions build/cmake/fudge.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Origignal script from https://github.com/ziglang/zig/issues/4911
# Modified to add SILKDOTNET_ paths in response to some issues with SwiftShader

args=""
for arg in "$@"
do
parg="$arg"

option=${arg%=*}
target=${arg#*=}
if [[ $option == "-march" || $option == "-mcpu" || $option == "-mtune" ]]; then
moveon=0
for replace in $SILKDOTNET_ReplaceArchitectureZigCcFlags
do
replacetarget=${replace%=*}
replacement=${replace#*=}
# echo $replacetarget A $replacement B $target END
if [[ $replacetarget == $target ]]; then
if [[ "$replacement" == "" ]]; then
moveon=1
else
target="$replacement"
fi
fi
done
if [[ $moveon == 1 || "$SILKDOTNET_RemoveAllPotentiallyProblematicZigCcFlags" == "1" ]]; then
continue
else
fixedTarget=${target//-/_}
parg="$option=$fixedTarget"
fi
fi
args="$args $parg"
done
2 changes: 1 addition & 1 deletion build/cmake/x86_64-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")

set(CMAKE_ASM_COMPILER "/usr/bin/x86_64-linux-gnu-as")
set(CMAKE_ASM_COMPILER "/usr/bin/x86_64-linux-gnu-gcc")
set(CMAKE_C_COMPILER "/usr/bin/x86_64-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/x86_64-linux-gnu-g++")

Expand Down
2 changes: 2 additions & 0 deletions build/cmake/zig-ar.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
zig ar %*
2 changes: 2 additions & 0 deletions build/cmake/zig-ar.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
zig ar "$@"
3 changes: 3 additions & 0 deletions build/cmake/zig-c++.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
: TODO add -march/-mtune handling if necessary
zig c++ %*
3 changes: 3 additions & 0 deletions build/cmake/zig-c++.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
. "$(dirname ${BASH_SOURCE[0]})/fudge.sh" $args
zig c++ $args
3 changes: 3 additions & 0 deletions build/cmake/zig-cc.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
: TODO add -march/-mtune handling if necessary
zig cc %*
3 changes: 3 additions & 0 deletions build/cmake/zig-cc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
. "$(dirname ${BASH_SOURCE[0]})/fudge.sh" $args
zig cc $args
2 changes: 2 additions & 0 deletions build/cmake/zig-ranlib.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
zig ranlib %*
2 changes: 2 additions & 0 deletions build/cmake/zig-ranlib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
zig ranlib "$@"
2 changes: 2 additions & 0 deletions build/cmake/zig-rc.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
zig rc %*
2 changes: 2 additions & 0 deletions build/cmake/zig-rc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
zig rc "$@"
2 changes: 2 additions & 0 deletions build/cmake/zig-toolchain-aarch64-linux-gnu.2.17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(ZIG_TARGET "aarch64-linux-gnu.2.17")
include(${CMAKE_CURRENT_LIST_DIR}/zig-toolchain.cmake)
2 changes: 2 additions & 0 deletions build/cmake/zig-toolchain-arm-linux-gnueabihf.2.17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(ZIG_TARGET "arm-linux-gnueabihf.2.17")
include(${CMAKE_CURRENT_LIST_DIR}/zig-toolchain.cmake)
2 changes: 2 additions & 0 deletions build/cmake/zig-toolchain-x86_64-linux-gnu.2.17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(ZIG_TARGET "x86_64-linux-gnu.2.17")
include(${CMAKE_CURRENT_LIST_DIR}/zig-toolchain.cmake)
40 changes: 40 additions & 0 deletions build/cmake/zig-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
include_guard()

if(CMAKE_GENERATOR MATCHES "Visual Studio")
message(FATAL_ERROR "Visual Studio generator not supported, use: cmake -G Ninja")
endif()

if(NOT ZIG_TARGET MATCHES "^([a-zZ-Z0-9_]+)-([a-zZ-Z0-9_]+)-([a-zZ-Z0-9_.]+)$")
message(FATAL_ERROR "Expected -DZIG_TARGET=<arch>-<os>-<abi>")
endif()

set(ZIG_ARCH ${CMAKE_MATCH_1})
set(ZIG_OS ${CMAKE_MATCH_2})
set(ZIG_ABI ${CMAKE_MATCH_3})

if(ZIG_OS STREQUAL "linux")
set(CMAKE_SYSTEM_NAME "Linux")
elseif(ZIG_OS STREQUAL "windows")
set(CMAKE_SYSTEM_NAME "Windows")
elseif(ZIG_OS STREQUAL "macos")
set(CMAKE_SYSTEM_NAME "Darwin")
else()
message(WARNING "Unknown OS: ${ZIG_OS}")
endif()

set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR ${ZIG_ARCH})

if(WIN32)
set(SCRIPT_SUFFIX ".cmd")
else()
set(SCRIPT_SUFFIX ".sh")
endif()

# This is working (thanks to Simon for finding this trick)
set(CMAKE_AR "${CMAKE_CURRENT_LIST_DIR}/zig-ar${SCRIPT_SUFFIX}")
set(CMAKE_RANLIB "${CMAKE_CURRENT_LIST_DIR}/zig-ranlib${SCRIPT_SUFFIX}")
set(CMAKE_RC_COMPILER "${CMAKE_CURRENT_LIST_DIR}/zig-rc${SCRIPT_SUFFIX}")
set(CMAKE_ASM_COMPILER "${CMAKE_CURRENT_LIST_DIR}/zig-cc${SCRIPT_SUFFIX}" -target ${ZIG_TARGET})
set(CMAKE_C_COMPILER "${CMAKE_CURRENT_LIST_DIR}/zig-cc${SCRIPT_SUFFIX}" -target ${ZIG_TARGET})
set(CMAKE_CXX_COMPILER "${CMAKE_CURRENT_LIST_DIR}/zig-c++${SCRIPT_SUFFIX}" -target ${ZIG_TARGET})
1 change: 0 additions & 1 deletion build/nuke/Build.Generation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ partial class Build
Target RegenerateBindings => CommonTarget
(
x => x.After(Clean)
.DependsOn(Restore)
.Executes
(
() =>
Expand Down
Loading

0 comments on commit c940b96

Please sign in to comment.