Skip to content

Commit ff4c45e

Browse files
kcbannerhazeycode
andauthored
- Fixup build script deprecations (#2)
- Update build.zig.zon Co-authored-by: Chris Heyes <[email protected]>
1 parent 96f9458 commit ff4c45e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

build.zig

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ pub fn build(b: *std.Build) void {
88
.root_source_file = b.path("src/znoise.zig"),
99
});
1010

11-
const fnl = b.addStaticLibrary(.{
11+
const fnl = b.addLibrary(.{
1212
.name = "FastNoiseLite",
13-
.target = target,
14-
.optimize = optimize,
13+
.linkage = .static,
14+
.root_module = b.createModule(.{
15+
.target = target,
16+
.optimize = optimize,
17+
}),
1518
});
1619
fnl.linkLibC();
1720
fnl.addIncludePath(b.path("libs/FastNoiseLite"));
@@ -25,9 +28,11 @@ pub fn build(b: *std.Build) void {
2528

2629
const tests = b.addTest(.{
2730
.name = "znoise-tests",
28-
.root_source_file = b.path("src/znoise.zig"),
29-
.target = target,
30-
.optimize = optimize,
31+
.root_module = b.createModule(.{
32+
.root_source_file = b.path("src/znoise.zig"),
33+
.target = target,
34+
.optimize = optimize,
35+
}),
3136
});
3237
tests.linkLibrary(fnl);
3338
b.installArtifact(tests);

build.zig.zon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.name = .znoise,
33
.fingerprint = 0x20f0ee30a768ad80,
44
.version = "0.3.0-dev",
5+
.minimum_zig_version = "0.14.0",
56
.paths = .{
67
"build.zig",
78
"build.zig.zon",

0 commit comments

Comments
 (0)