An open API service indexing awesome lists of open source software.

https://github.com/zig-gamedev/system_sdk

System libraries and headers for cross-compiling zig-gamedev libs & sample apps
https://github.com/zig-gamedev/system_sdk

cross-platform gamedev sdk zig

Last synced: 7 months ago
JSON representation

System libraries and headers for cross-compiling zig-gamedev libs & sample apps

Awesome Lists containing this project

README

          

# [zig-gamedev system_sdk](https://github.com/zig-gamedev/system_sdk)

System libraries and headers for cross-compiling [zig-gamedev](https://github.com/zig-gamedev) libs and sample applications.

## Usage
build.zig
```zig
switch (target.os.tag) {
.windows => {
if (target.cpu.arch.isX86()) {
if (target.abi.isGnu() or target.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.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.cpu.arch == .aarch64) {
if (b.lazyDependency("system_sdk", .{})) |system_sdk| {
compile_step.addLibraryPath(system_sdk.path("linux/lib/aarch64-linux-gnu"));
}
}
},
else => {},
}
```