blob: 686fc56f4719de8dfcc4518f41b97d0f429f6a2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
const Builder = @import("std").build.Builder;
const builtin = @import("builtin");
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const windows = b.option(bool, "windows", "create windows build") orelse false;
var exe = b.addExecutable("test", "src/main.zig");
exe.setBuildMode(mode);
if (windows) {
exe.setTarget(builtin.Arch.x86_64, builtin.Os.windows, builtin.Abi.gnu);
}
exe.linkSystemLibrary("c");
exe.linkSystemLibrary("glfw");
exe.linkSystemLibrary("epoxy");
exe.addIncludeDir("cimgui");
exe.linkSystemLibraryName("cimgui/cimgui.so");
exe.install();
const play = b.step("play", "Play the game");
const run = exe.run();
run.step.dependOn(b.getInstallStep());
play.dependOn(&run.step);
}
|