defun-games / claylib

A Common Lisp 2D/3D game toolkit built on top of Raylib 4.5.
zlib License
69 stars 4 forks source link

Allow using system raylib libraries #71

Closed simendsjo closed 1 year ago

simendsjo commented 1 year ago

This is useful for users who cannot use the prebuilt libraries from claylib like Guix and Nix users.

simendsjo commented 1 year ago

This is my external solution to my previous PR, https://github.com/defun-games/claylib/pull/70. See https://github.com/simendsjo/guixified-claylib for how it's used. It's conceptually the same, but with some bugfixes and only referring to claylib as a submodule.

But I need to stop claylib from trying to load the prebuilt libraries, hence this patch.

shelvick commented 1 year ago

Yeah this is fine, though I'm going to push it to dev for now rather than main.

You should also be aware that in the near future I'm likely going to have to patch Raygui again, if I can't find a way around it. Trying to use its scroll bars that are internal only. I don't know what you ended up doing about the existing patches but you should not rely on our own build process remaining the same.

simendsjo commented 1 year ago

I don't know what you ended up doing about the existing patches but you should not rely on our own build process remaining the same.

I just copy raylib.h and raymath.h: https://github.com/simendsjo/guixified-claylib/blob/master/guix.scm#L39-L40 Raygui is compiled like normal where I just -lraylib from the previously built package. But I also apply a patch for the non-bleeding edge glfw: https://github.com/simendsjo/guixified-claylib/blob/master/guix.scm#L22

As long as you add patches or complete pre-patched files in your repo, I'm pretty much good.