Not-Nik / raylib-zig

Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib
MIT License
473 stars 101 forks source link

Implement system-raylib flag #54

Closed misuba closed 9 months ago

misuba commented 9 months ago

So unless I'm misreading the code, this flag is not implemented and there's currently no way to use the system raylib instead of a fresh download, yes?

(This is relevant to me as raylib doesn't seem to want to compile on MacOS as of an Xcode update a couple days ago, but I got it installed via Homebrew first.)

Not-Nik commented 9 months ago

I don't think the zig package manager supports this kind of behaviour, and I don't have plans to reimplement this flag.

If your raylib build does fail with the Zig c compiler, please create an issue on Zig's repository and take it up with them

Not-Nik commented 9 months ago

I just realised that, of course, you don't need to use the link function provided. Instead just call exe.linkSystemLibrary("raylib");. You may also need to link some system specific libraries, but you can just copy the switch statement from the build.zig.