diff options
| author | 2023-07-04 03:16:51 +0300 | |
|---|---|---|
| committer | 2023-07-04 03:16:51 +0300 | |
| commit | f59c9dbb71153d0be62f7afcf4a1c9e8a4d59619 (patch) | |
| tree | 2d93bea4367cae2a5eb473411a32d59444480b1c /build.zig | |
| parent | Use build.zig.zon for fetching curl (diff) | |
| download | zup-f59c9dbb71153d0be62f7afcf4a1c9e8a4d59619.tar.gz zup-f59c9dbb71153d0be62f7afcf4a1c9e8a4d59619.tar.xz zup-f59c9dbb71153d0be62f7afcf4a1c9e8a4d59619.zip | |
Use build.zig.zon for fetching libarchive
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -15,6 +15,7 @@ pub fn build(b: *Build) void { | |||
| 15 | 15 | ||
| 16 | const clap = b.dependency("clap", .{}); | 16 | const clap = b.dependency("clap", .{}); |
| 17 | const curl = b.dependency("curl", .{}); | 17 | const curl = b.dependency("curl", .{}); |
| 18 | const libarchive = b.dependency("libarchive", .{}); | ||
| 18 | 19 | ||
| 19 | const exe = b.addExecutable(.{ | 20 | const exe = b.addExecutable(.{ |
| 20 | .name = "zup", | 21 | .name = "zup", |
| @@ -26,9 +27,7 @@ pub fn build(b: *Build) void { | |||
| 26 | exe.addOptions("zup-config", config); | 27 | exe.addOptions("zup-config", config); |
| 27 | exe.addModule("clap", clap.module("clap")); | 28 | exe.addModule("clap", clap.module("clap")); |
| 28 | exe.addModule("curl", curl.module("curl")); | 29 | exe.addModule("curl", curl.module("curl")); |
| 29 | exe.addModule("libarchive", b.createModule(.{ | 30 | exe.addModule("libarchive", libarchive.module("libarchive")); |
| 30 | .source_file = .{ .path = "libs/libarchive/libarchive.zig" }, | ||
| 31 | })); | ||
| 32 | exe.addModule("xdg", b.createModule(.{ .source_file = .{ .path = "libs/xdg/xdg.zig" } })); | 31 | exe.addModule("xdg", b.createModule(.{ .source_file = .{ .path = "libs/xdg/xdg.zig" } })); |
| 33 | exe.linkLibC(); | 32 | exe.linkLibC(); |
| 34 | exe.linkSystemLibrary("libarchive"); | 33 | exe.linkSystemLibrary("libarchive"); |