ona/build.zig

35 lines
785 B
Zig
Raw Normal View History

2023-04-19 01:25:35 +02:00
const std = @import("std");
2023-05-28 03:26:41 +02:00
pub fn build(b: *std.Build) void {
2023-07-10 02:10:56 +02:00
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
2023-05-28 03:26:41 +02:00
const coral_module = b.createModule(.{.source_file = .{.path = "./source/coral/coral.zig"}});
2023-04-19 01:25:35 +02:00
2023-05-28 03:26:41 +02:00
const ona_module = b.createModule(.{
2023-04-19 01:25:35 +02:00
.source_file = .{.path = "./source/ona/ona.zig"},
.dependencies = &.{
.{
.name = "coral",
.module = coral_module,
2023-04-19 01:25:35 +02:00
},
},
});
2023-07-10 02:10:56 +02:00
b.installArtifact(create: {
const runner_exe = b.addExecutable(.{
.name = "runner",
.root_source_file = .{ .path = "source/runner.zig" },
.target = target,
.optimize = optimize,
2023-04-19 01:25:35 +02:00
});
2023-07-10 02:10:56 +02:00
runner_exe.addModule("ona", ona_module);
runner_exe.linkLibC();
runner_exe.linkSystemLibrary("SDL2");
2023-04-19 01:25:35 +02:00
2023-07-10 02:10:56 +02:00
break: create runner_exe;
});
2023-04-19 01:25:35 +02:00
}