mirror of
https://github.com/jedisct1/minisign.git
synced 2025-04-03 02:47:41 +03:00
Update for Zig 0.11
This commit is contained in:
parent
709fed6b73
commit
8aef018182
2 changed files with 15 additions and 12 deletions
|
@ -24,7 +24,7 @@ Dependencies:
|
|||
|
||||
Compilation:
|
||||
|
||||
$ zig build -Drelease-safe
|
||||
$ zig build -Drelease
|
||||
|
||||
## Using cmake and gcc or clang:
|
||||
|
||||
|
|
25
build.zig
25
build.zig
|
@ -1,21 +1,24 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
var target = b.standardTargetOptions(.{});
|
||||
const mode = b.standardReleaseOptions();
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{ .preferred_optimize_mode = .ReleaseSmall });
|
||||
|
||||
const minisign = b.addExecutable("minisign", null);
|
||||
minisign.setTarget(target);
|
||||
minisign.setBuildMode(mode);
|
||||
minisign.install();
|
||||
const minisign = b.addExecutable(.{
|
||||
.name = "minisign",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
minisign.linkLibC();
|
||||
minisign.addLibraryPath("/opt/homebrew/lib");
|
||||
minisign.addLibraryPath("/usr/local/lib");
|
||||
minisign.addLibraryPath(.{ .path = "/opt/homebrew/lib" });
|
||||
minisign.addLibraryPath(.{ .path = "/usr/local/lib" });
|
||||
minisign.linkSystemLibrary("sodium");
|
||||
|
||||
minisign.addIncludePath("src");
|
||||
minisign.addSystemIncludePath("/opt/homebrew/include");
|
||||
minisign.addSystemIncludePath("/usr/local/include");
|
||||
minisign.addIncludePath(.{ .path = "src" });
|
||||
minisign.addSystemIncludePath(.{ .path = "/opt/homebrew/include" });
|
||||
minisign.addSystemIncludePath(.{ .path = "/usr/local/include" });
|
||||
minisign.defineCMacro("_GNU_SOURCE", "1");
|
||||
minisign.addCSourceFiles(&.{ "src/base64.c", "src/get_line.c", "src/helpers.c", "src/minisign.c" }, &.{});
|
||||
|
||||
b.installArtifact(minisign);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue