From ff70a04bf5e2aea84fe9d71cede790e1a031f810 Mon Sep 17 00:00:00 2001 From: star-tek-mb Date: Sun, 5 Feb 2023 17:03:03 +0500 Subject: update zig build to latest master (#2910) also, adds package manager support --- build.zig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 build.zig (limited to 'build.zig') diff --git a/build.zig b/build.zig new file mode 100644 index 00000000..9959d8e0 --- /dev/null +++ b/build.zig @@ -0,0 +1,18 @@ +const std = @import("std"); +const raylib = @import("src/build.zig"); + +pub fn build(b: *std.Build) void { + // Standard target options allows the person running `zig build` to choose + // what target to build for. Here we do not override the defaults, which + // means any target is allowed, and the default is native. Other options + // for restricting supported target set are available. + const target = b.standardTargetOptions(.{}); + // Standard optimization options allow the person running `zig build` to select + // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not + // set a preferred release mode, allowing the user to decide how to optimize. + const optimize = b.standardOptimizeOption(.{}); + + const lib = raylib.addRaylib(b, target, optimize); + lib.installHeader("src/raylib.h", "raylib.h"); + lib.install(); +} \ No newline at end of file -- cgit v1.2.3