feat(zig): update outdated path syntax

Both options are allowed in zig 0.12, but only b.path() in later
versions.
This commit is contained in:
bfredl 2024-05-23 21:44:52 +02:00 committed by GitHub
parent f0ec14ebfd
commit 4a8be390f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,9 +8,9 @@ pub fn build(b: *std.Build) void {
});
lib.linkLibC();
lib.addCSourceFile(.{ .file = .{ .path = "lib/src/lib.c" }, .flags = &.{"-std=c11"} });
lib.addIncludePath(.{ .path = "lib/include" });
lib.addIncludePath(.{ .path = "lib/src" });
lib.addCSourceFile(.{ .file = b.path("lib/src/lib.c"), .flags = &.{"-std=c11"} });
lib.addIncludePath(b.path("lib/include"));
lib.addIncludePath(b.path("lib/src"));
lib.installHeadersDirectory(b.path("lib/include"), ".", .{});