Update build.zig to be compatible with zig 0.10.0+

This commit is contained in:
overcat 2023-01-03 20:00:13 +08:00
parent a2c8848418
commit 7700b26774
No known key found for this signature in database
GPG key ID: 7FC71F0702CF2A2B

View file

@ -9,13 +9,13 @@ pub fn build(b: *std.build.Builder) !void {
minisign.setBuildMode(mode); minisign.setBuildMode(mode);
minisign.install(); minisign.install();
minisign.linkLibC(); minisign.linkLibC();
minisign.addLibPath("/opt/homebrew/lib"); minisign.addLibraryPath("/opt/homebrew/lib");
minisign.addLibPath("/usr/local/lib"); minisign.addLibraryPath("/usr/local/lib");
minisign.linkSystemLibrary("sodium"); minisign.linkSystemLibrary("sodium");
minisign.addIncludeDir("src"); minisign.addIncludePath("src");
minisign.addSystemIncludeDir("/opt/homebrew/include"); minisign.addSystemIncludePath("/opt/homebrew/include");
minisign.addSystemIncludeDir("/usr/local/include"); minisign.addSystemIncludePath("/usr/local/include");
minisign.defineCMacro("_GNU_SOURCE", "1"); minisign.defineCMacro("_GNU_SOURCE", "1");
minisign.addCSourceFiles(&.{ "src/base64.c", "src/get_line.c", "src/helpers.c", "src/minisign.c" }, &.{}); minisign.addCSourceFiles(&.{ "src/base64.c", "src/get_line.c", "src/helpers.c", "src/minisign.c" }, &.{});
} }