ona/build.zig

35 lines
785 B
Zig

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 runner_exe = b.addExecutable(.{
.name = "runner",
.root_source_file = .{ .path = "source/runner.zig" },
.target = target,
.optimize = optimize,
});
runner_exe.addModule("ona", ona_module);
runner_exe.linkLibC();
runner_exe.linkSystemLibrary("SDL2");
break: create runner_exe;
});
}