L-Briand / raylib-zig-bindings

One to one translation of raylib.h, rlgl.h, rcamera.h and raygui.h files in zig. Build tools to compile raylib from source with simple zon dependency.
zlib License
9 stars 2 forks source link

Doesn't build with Zig 0.13.0 #2

Open Srekel opened 1 month ago

Srekel commented 1 month ago

I took a stab at it but getting an error about using an absolute path, I haven't had time to dig into it further.

Most of it seems to be changing step.addIncludePath(.{ .path = glfwInclude }); to something like step.addIncludePath(b.path(glfwInclude));

Could simply be that after fixing these lines it's on the application's side.

Srekel commented 1 month ago

Btw, sidenote, but in case you want to add a "projects using this", feel free to link to:

https://github.com/Srekel/tides-of-tabletop

:)

Srekel commented 1 month ago

I solved it by

  1. changing to self.raylibSrcPath.src_path.sub_path in raylib.build.zig

  2. changing to var setup = try rlzb.Setup.init(b, .{ .src_path = .{ .owner = b, .sub_path = "external/raylib/src" } }, .{});

in my build.zig. :) I don't have a fork... yet.. so don't have a good way to PR it.