Add build.zig file

This commit is contained in:
Frank Denis 2021-10-08 15:04:21 +02:00
parent f6965a0858
commit 52ccad8685
3 changed files with 29 additions and 5 deletions

17
build.zig Normal file
View file

@ -0,0 +1,17 @@
const std = @import("std");
pub fn build(b: *std.build.Builder) !void {
var target = b.standardTargetOptions(.{});
const mode = b.standardReleaseOptions();
const minisign = b.addExecutable("minisign", null);
minisign.setTarget(target);
minisign.setBuildMode(mode);
minisign.install();
minisign.linkLibC();
minisign.linkSystemLibrary("sodium");
minisign.addIncludeDir("src");
minisign.addSystemIncludeDir("/usr/local/include");
minisign.addCSourceFiles(&.{ "src/base64.c", "src/get_line.c", "src/helpers.c", "src/minisign.c" }, &.{});
}