Mirror of zig-gamedev/system_sdk for WetGrape cross builds
  • C 68.5%
  • Objective-C 18.5%
  • C++ 11%
  • R 1.5%
  • Rez 0.5%
Find a file
2025-09-24 11:57:12 +01:00
linux Initial commit 2024-06-10 19:46:08 +01:00
macos12 Initial commit 2024-06-10 19:46:08 +01:00
windows/lib/x86_64-windows-gnu Initial commit 2024-06-10 19:46:08 +01:00
.gitattributes Disable LFS 2025-02-09 14:39:12 +00:00
.gitignore Initial commit 2024-06-10 19:46:08 +01:00
build.zig Create build.zig 2024-11-04 22:37:19 +00:00
build.zig.zon upgrade to zig 0.14.0 (#1) 2025-03-10 07:58:39 +00:00
LICENSE Initial commit 2024-06-10 19:46:08 +01:00
README.md Fix target reference in README.md for build.zig (#2) 2025-09-24 11:57:12 +01:00

zig-gamedev system_sdk

System libraries and headers for cross-compiling zig-gamedev libs and sample applications.

Usage

build.zig

    switch (target.result.os.tag) {
        .windows => {
            if (target.result.cpu.arch.isX86()) {
                if (target.result.abi.isGnu() or target.result.abi.isMusl()) {
                    if (b.lazyDependency("system_sdk", .{})) |system_sdk| {
                        compile_step.addLibraryPath(system_sdk.path("windows/lib/x86_64-windows-gnu"));
                    }
                }
            }
        },
        .macos => {
            if (b.lazyDependency("system_sdk", .{})) |system_sdk| {
                compile_step.addLibraryPath(system_sdk.path("macos12/usr/lib"));
                compile_step.addFrameworkPath(system_sdk.path("macos12/System/Library/Frameworks"));
            }
        },
        .linux => {
            if (target.result.cpu.arch.isX86()) {
                if (b.lazyDependency("system_sdk", .{})) |system_sdk| {
                    compile_step.addLibraryPath(system_sdk.path("linux/lib/x86_64-linux-gnu"));
                }
            } else if (target.result.cpu.arch == .aarch64) {
                if (b.lazyDependency("system_sdk", .{})) |system_sdk| {
                    compile_step.addLibraryPath(system_sdk.path("linux/lib/aarch64-linux-gnu"));
                }
            }
        },
        else => {},
    }