mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 03:57:29 +00:00
Update to raylib 5.0
This commit is contained in:
parent
239d3a2d96
commit
654fd4b99f
@ -4,7 +4,7 @@
|
||||
|
||||
Manually tweaked, auto-generated [raylib](https://github.com/raysan5/raylib) bindings for zig.
|
||||
|
||||
Bindings tested on raylib version 4.6.0-dev and Zig 0.11.0
|
||||
Bindings tested on raylib version 5.0 and Zig 0.11.0/0.12.0-dev.1849+bb0f7d55e
|
||||
|
||||
Thanks to all the [contributors](https://github.com/Not-Nik/raylib-zig/graphs/contributors) for their help with this binding.
|
||||
|
||||
|
10
build.zig
10
build.zig
@ -20,7 +20,7 @@ pub fn link(
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
var art = raylib.artifact("raylib");
|
||||
const art = raylib.artifact("raylib");
|
||||
|
||||
const target_os = exe.target.toTarget().os.tag;
|
||||
switch (target_os) {
|
||||
@ -94,7 +94,7 @@ fn getModuleInternal(b: *std.Build) *std.Build.Module {
|
||||
|
||||
pub const math = struct {
|
||||
pub fn getModule(b: *std.Build, comptime rl_path: []const u8) *std.Build.Module {
|
||||
var raylib = rl.getModule(b, rl_path);
|
||||
const raylib = rl.getModule(b, rl_path);
|
||||
return b.addModule("raylib-math", .{
|
||||
.source_file = .{ .path = rl_path ++ "/lib/raylib-zig-math.zig" },
|
||||
.dependencies = &.{.{ .name = "raylib-zig", .module = raylib }},
|
||||
@ -102,7 +102,7 @@ pub const math = struct {
|
||||
}
|
||||
|
||||
fn getModuleInternal(b: *std.Build) *std.Build.Module {
|
||||
var raylib = rl.getModuleInternal(b);
|
||||
const raylib = rl.getModuleInternal(b);
|
||||
return b.addModule("raylib-math", .{
|
||||
.source_file = .{ .path = "lib/raylib-zig-math.zig" },
|
||||
.dependencies = &.{.{ .name = "raylib-zig", .module = raylib }},
|
||||
@ -179,8 +179,8 @@ pub fn build(b: *std.Build) !void {
|
||||
|
||||
const examples_step = b.step("examples", "Builds all the examples");
|
||||
|
||||
var raylib = rl.getModuleInternal(b);
|
||||
var raylib_math = rl.math.getModuleInternal(b);
|
||||
const raylib = rl.getModuleInternal(b);
|
||||
const raylib_math = rl.math.getModuleInternal(b);
|
||||
|
||||
for (examples) |ex| {
|
||||
if (target.getOsTag() == .emscripten) {
|
||||
|
@ -3,8 +3,9 @@
|
||||
.version = "0.1.0",
|
||||
.dependencies = .{
|
||||
.raylib = .{
|
||||
.url = "https://github.com/raysan5/raylib/archive/6094869e3e845e90e1e8ae41b98e889fb3e13e78.tar.gz",
|
||||
.hash = "12203b7a16bcf8d7fe4c9990a46d92b6f2e35531a4b82eb3bdf8ba4a0dbcc5f21415",
|
||||
.url = "https://github.com/raysan5/raylib/archive/36df9c5bd6999d5a047cf94097f258a27aaafc52.tar.gz",
|
||||
.hash = "122077f81f0c905e41bd46a4e2487dfeeaf9419e857e86329ad71e2a58e65ec6d93e",
|
||||
},
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user