diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 12 |
1 files changed, 5 insertions, 7 deletions
| @@ -24,12 +24,10 @@ pub fn build(b: *Build) void { | |||
| 24 | .target = target, | 24 | .target = target, |
| 25 | .optimize = optimize, | 25 | .optimize = optimize, |
| 26 | }); | 26 | }); |
| 27 | exe.addOptions("zup-config", config); | 27 | exe.root_module.addOptions("zup-config", config); |
| 28 | exe.addModule("clap", clap.module("clap")); | 28 | exe.root_module.addImport("clap", clap.module("clap")); |
| 29 | exe.addModule("libarchive", libarchive.module("libarchive")); | 29 | exe.root_module.addImport("libarchive", libarchive.module("libarchive")); |
| 30 | exe.addModule("xdg", xdg.module("xdg")); | 30 | exe.root_module.addImport("xdg", xdg.module("xdg")); |
| 31 | exe.linkLibC(); | ||
| 32 | exe.linkSystemLibrary("libarchive"); | ||
| 33 | b.installArtifact(exe); | 31 | b.installArtifact(exe); |
| 34 | 32 | ||
| 35 | const run_cmd = b.addRunArtifact(exe); | 33 | const run_cmd = b.addRunArtifact(exe); |
| @@ -55,7 +53,7 @@ const default_version = SemanticVersion.parse("0.2.1") catch unreachable; | |||
| 55 | 53 | ||
| 56 | fn getVersion(b: *Build) SemanticVersion { | 54 | fn getVersion(b: *Build) SemanticVersion { |
| 57 | var out_code: u8 = undefined; | 55 | var out_code: u8 = undefined; |
| 58 | const untrimmed = b.execAllowFail( | 56 | const untrimmed = b.runAllowFail( |
| 59 | &.{ "git", "-C", b.build_root.path.?, "describe", "--tags" }, | 57 | &.{ "git", "-C", b.build_root.path.?, "describe", "--tags" }, |
| 60 | &out_code, | 58 | &out_code, |
| 61 | .Ignore, | 59 | .Ignore, |