~cricket/jazz

ref: 1783c2ca502b71708f1867ecdc9277fd3f76fa09 jazz/build.zig -rw-r--r-- 594 bytes
1783c2cac piapiac small formatting update 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const std = @import("std");

pub fn build(b: *std.build.Builder) void {
    const target = b.standardTargetOptions(.{});
    const mode = b.standardReleaseOptions();

    const exe = b.addExecutable("jazz", "jazz.zig");

    exe.addPackage(.{ .name="zckt", .path="lib/zckt/zckt.zig" });
    exe.setTarget(target);
    exe.setBuildMode(mode);
    exe.install();

    const run_cmd = exe.run();
    run_cmd.step.dependOn(b.getInstallStep());
    if (b.args) |args| {
        run_cmd.addArgs(args);
    }

    const run_step = b.step("run", "Run the app");
    run_step.dependOn(&run_cmd.step);
}