const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const coral_module = b.createModule(.{.source_file = .{.path = "./source/coral/coral.zig"}}); const ona_module = b.createModule(.{ .source_file = .{.path = "./source/ona/ona.zig"}, .dependencies = &.{ .{ .name = "coral", .module = coral_module, }, }, }); b.installArtifact(create: { const compile_step = b.addExecutable(.{ .name = "runner", .root_source_file = .{ .path = "source/runner.zig" }, .target = target, .optimize = optimize, }); compile_step.addModule("ona", ona_module); compile_step.linkLibC(); compile_step.linkSystemLibrary("SDL2"); break: create compile_step; }); b.step("test", "Run unit tests").dependOn(create: { const tests = b.addTest(.{ .root_source_file = .{.path = "source/test.zig"}, .target = target, .optimize = optimize, }); break: create &tests.step; }); }