ona/build.zig

47 lines
1.0 KiB
Zig
Executable File

const std = @import("std");
pub fn build(builder: *std.Build) void {
const coral_module = builder.createModule(.{.source_file = .{.path = "./source/coral/coral.zig"}});
const ona_module = builder.createModule(.{
.source_file = .{.path = "./source/ona/ona.zig"},
.dependencies = &.{
.{
.name = "coral",
.module = coral_module
},
},
});
const kym_module = builder.createModule(.{
.source_file = .{.path = "./source/kym/kym.zig"},
.dependencies = &.{
.{
.name = "coral",
.module = coral_module
},
},
});
// Ona Runner.
{
const ona_exe = builder.addExecutable(.{
.name = "ona-runner",
.root_source_file = .{.path = "./source/runner.zig"},
.target = builder.standardTargetOptions(.{}),
.optimize = .Debug,
});
ona_exe.addModule("coral", coral_module);
ona_exe.addModule("ona", ona_module);
ona_exe.addModule("kym", kym_module);
// ona_exe.addIncludeDir("./ext");
ona_exe.linkSystemLibrary("SDL2");
ona_exe.linkLibC();
builder.installArtifact(ona_exe);
}
}