From d79befe12a8d6b32a41beb88d6e75b12a75615a7 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Wed, 30 Jun 2021 17:19:47 +0200 Subject: rotating cube --- build.zig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 build.zig (limited to 'build.zig') 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); +} -- cgit v1.2.3