diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -82,6 +82,18 @@ pub fn build(b: *std.Build) void { vaxis_mod.addImport("uucode", uucode_mod); exe.root_module.addImport("vaxis", vaxis_mod); + // zstbi: C (stb_image)-backed image decoder for the image-viewer panes. We use + // it instead of zigimg because zigimg's pure-Zig decoder crashes the Zig 0.16 + // compiler here; stb_image is plain C (extern fns), so it compiles fine, decodes + // every common format, and offers downscaling. Its module ("root") carries the + // C source + include path + libc, so importing it is all that's needed. + const zstbi_mod = b.dependency("zstbi", .{ .target = target, .optimize = optimize }).module("root"); + exe.root_module.addImport("zstbi", zstbi_mod); + + // Install the exe so `zig build` (and `zig build install`) produces it in + // zig-out/bin for global install, not just as a hidden dep of `run`/`test`. + b.installArtifact(exe); + const run_exe = b.addRunArtifact(exe); const run = b.step("run", "descend to the pardes"); |
