Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using system libraries #139

Open
theoparis opened this issue Sep 25, 2024 · 1 comment
Open

Support using system libraries #139

theoparis opened this issue Sep 25, 2024 · 1 comment

Comments

@theoparis
Copy link

theoparis commented Sep 25, 2024

I have https://github.com/libsdl-org/sdl2-compat installed on my system but KeyCodes.hpp uses a hard coded third_party directory instead of <SDL2/SDL.h>...
Same with zlib/zlib-ng, GLESv1 libraries from ANGLE, raknet, etc.
I think the correct solution would involve modifying CMakeLists.txt to use PkgConfig and modifying source files to use the correct SDL2 header path

@theoparis theoparis changed the title Support external SDL2 using find_package Support using system libraries Sep 26, 2024
@iProgramMC
Copy link
Member

This actually already happens. Well, except for Android, where we have to use a fork of SDL2 that works on there. The only place it never does is in KeyCodes.hpp.

I think simply cloning recursively and compiling will do the trick. I don't see why the SDL2-Android key code definitions would differ from your system-installed library's.

The zlib library is vendored to fix a compilation error on windows. I don't remember why we vendor RakNet but it is for a good reason. Other than changing the protocol version from 6 to 4 it might work with standard raknet as a submodule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants