mirror of
https://github.com/IgLemp/platformer.git
synced 2025-01-18 14:08:53 +01:00
7b8fd319c4
this is a bad idea
25 lines
814 B
Zig
25 lines
814 B
Zig
const std = @import("std");
|
|
const Builder = std.build.Builder;
|
|
const raylib = @import("raylib-zig/lib.zig"); //call .Pkg() with the folder raylib-zig is in relative to ray-test build.zig
|
|
|
|
pub fn build(b: *Builder) void {
|
|
const mode = b.standardReleaseOptions();
|
|
const target = b.standardTargetOptions(.{});
|
|
|
|
const system_lib = b.option(bool, "system-raylib", "link to preinstalled raylib libraries") orelse false;
|
|
|
|
const exe = b.addExecutable("platformer", "src/main.zig");
|
|
exe.setBuildMode(mode);
|
|
exe.setTarget(target);
|
|
|
|
raylib.link(exe, system_lib);
|
|
raylib.addAsPackage("raylib", exe);
|
|
raylib.math.addAsPackage("raylib-math", exe);
|
|
|
|
const run_cmd = exe.run();
|
|
const run_step = b.step("run", "run ray-test");
|
|
run_step.dependOn(&run_cmd.step);
|
|
|
|
exe.install();
|
|
}
|