Skip to content

Commit 7533d8f

Browse files
authored
build.zig Refactor prebuilt API (#13)
* build.zig Refector prebuilt API * update README
1 parent 788a90f commit 7533d8f

File tree

2 files changed

+127
-142
lines changed

2 files changed

+127
-142
lines changed

README.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [zsdl](https://github.com/zig-gamedev/zsdl)
22

3-
Zig bindings for SDL libs. Work in progress.
3+
Zigified bindings for SDL libs. Work in progress.
44

55
## Getting started (SDL2)
66

@@ -24,16 +24,13 @@ pub fn build(b: *std.Build) !void {
2424
@import("zsdl").link_SDL2_image(exe);
2525
2626
// Optionally use prebuilt libs instead of relying on system installed SDL...
27-
@import("zsdl").prebuilt.addLibraryPathsTo(exe);
28-
if (@import("zsdl").prebuilt.install_SDL2(b, target.result, .bin)) |install_sdl2_step| {
27+
@import("zsdl").prebuilt_sdl2.addLibraryPathsTo(exe);
28+
if (@import("zsdl").prebuilt_sdl2.install_SDL2(b, target.result, .bin), .{
29+
.ttf = true,
30+
.image = true,
31+
}) |install_sdl2_step| {
2932
b.getInstallStep().dependOn(install_sdl2_step);
3033
}
31-
if (@import("zsdl").prebuilt.install_SDL2_ttf(b, target.result, .bin)) |install_sdl2_ttf_step| {
32-
b.getInstallStep().dependOn(install_sdl2_ttf_step);
33-
}
34-
if (@import("zsdl").prebuilt.install_SDL2_image(b, target.result, .bin)) |install_sdl2_image_step| {
35-
b.getInstallStep().dependOn(install_sdl2_image_step);
36-
}
3734
}
3835
```
3936

0 commit comments

Comments
 (0)