mirror of
https://github.com/jedisct1/minisign.git
synced 2025-04-04 19:37:48 +03:00
Update for zig-master
This commit is contained in:
parent
5f96819f44
commit
573988d235
1 changed files with 3 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
|
||||||
pub fn build(b: *std.build.Builder) !void {
|
pub fn build(b: *std.Build) !void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{ .preferred_optimize_mode = .ReleaseSmall });
|
const optimize = b.standardOptimizeOption(.{ .preferred_optimize_mode = .ReleaseSmall });
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ pub fn build(b: *std.build.Builder) !void {
|
||||||
.name = "minisign",
|
.name = "minisign",
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
|
.strip = true,
|
||||||
});
|
});
|
||||||
minisign.linkLibC();
|
minisign.linkLibC();
|
||||||
minisign.addLibraryPath(.{ .path = "/opt/homebrew/lib" });
|
minisign.addLibraryPath(.{ .path = "/opt/homebrew/lib" });
|
||||||
|
@ -19,11 +20,7 @@ pub fn build(b: *std.build.Builder) !void {
|
||||||
minisign.addSystemIncludePath(.{ .path = "/usr/local/include" });
|
minisign.addSystemIncludePath(.{ .path = "/usr/local/include" });
|
||||||
minisign.defineCMacro("_GNU_SOURCE", "1");
|
minisign.defineCMacro("_GNU_SOURCE", "1");
|
||||||
const source_files = &.{ "src/base64.c", "src/get_line.c", "src/helpers.c", "src/minisign.c" };
|
const source_files = &.{ "src/base64.c", "src/get_line.c", "src/helpers.c", "src/minisign.c" };
|
||||||
if (@hasDecl(std.Build.Step.Compile, "AddCSourceFilesOptions")) {
|
|
||||||
minisign.addCSourceFiles(.{ .files = source_files });
|
minisign.addCSourceFiles(.{ .files = source_files });
|
||||||
} else {
|
|
||||||
minisign.addCSourceFiles(source_files, &.{});
|
|
||||||
}
|
|
||||||
|
|
||||||
b.installArtifact(minisign);
|
b.installArtifact(minisign);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue