diff options
| author | Tom Barrett <tom@tombarrett.xyz> | 2021-06-30 17:19:47 +0200 | 
|---|---|---|
| committer | Tom Barrett <tom@tombarrett.xyz> | 2021-06-30 17:19:47 +0200 | 
| commit | d79befe12a8d6b32a41beb88d6e75b12a75615a7 (patch) | |
| tree | 365aa28165efa3e4727ce5ea0edbdf6c69135952 /build.zig | |
rotating cube
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..bbd4531 --- /dev/null +++ b/build.zig @@ -0,0 +1,21 @@ +const std = @import("std"); + +pub fn build(b: *std.build.Builder) void { +    const target = b.standardTargetOptions(.{}); +    const mode = b.standardReleaseOptions(); + +    const exe = b.addExecutable("cube", "src/main.zig"); +    exe.setTarget(target); +    exe.setBuildMode(mode); +    exe.install(); +    exe.linkSystemLibrary("SDL2"); + +    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); +} | 
