mirror of
https://github.com/IgLemp/platformer.git
synced 2025-12-14 19:05:31 +01:00
adding project to git
this is a bad idea
This commit is contained in:
24
build.zig
Normal file
24
build.zig
Normal file
@@ -0,0 +1,24 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user