glfw: update to latest Zig build API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
avokadoen 2023-02-07 19:19:47 +01:00 committed by Stephen Gutekanst
parent 3d769b9671
commit 06cc7b3115
4 changed files with 47 additions and 38 deletions

View file

@ -56,9 +56,9 @@ Then in your `build.zig` add:
...
const glfw = @import("libs/mach-glfw/build.zig");
pub fn build(b: *Builder) !void {
pub fn build(b: *Build) !void {
...
exe.addPackage(glfw.pkg);
exe.addModule("glfw", glfw.module(b));
try glfw.link(b, exe, .{});
}
```
@ -82,10 +82,10 @@ Then in your `build.zig` add:
const pkgs = @import("deps.zig").pkgs;
const glfw = @import("build-glfw");
pub fn build(b: *Builder) !void {
pub fn build(b: *Build) !void {
...
exe.addPackage(pkgs.glfw);
exe.addModule("glfw", pkgs.glfw);
try glfw.link(b, exe, .{});
}
```