diff --git a/raylib-c b/raylib-c index 07c5e54..15afe89 160000 --- a/raylib-c +++ b/raylib-c @@ -1 +1 @@ -Subproject commit 07c5e54f59cfddf53547793459488de37ca84244 +Subproject commit 15afe89aff2fc7da96ab5de80bde7f6186971cde diff --git a/raylib/build.py b/raylib/build.py index 9f39eb9..ca477c8 100644 --- a/raylib/build.py +++ b/raylib/build.py @@ -31,6 +31,7 @@ REPO_ROOT = THIS_DIR.parent RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop") +ENABLE_WAYLAND_DRM_LEASING = os.getenv("ENABLE_WAYLAND_DRM_LEASING") def check_raylib_installed(): return subprocess.run(['pkg-config', '--exists', 'raylib'], text=True, stdout=subprocess.PIPE).returncode == 0 @@ -47,6 +48,17 @@ def get_the_lib_path(): return subprocess.run(['pkg-config', '--variable=libdir', 'raylib'], text=True, stdout=subprocess.PIPE).stdout.strip() +def get_specified_libs(lib_target): + libs = subprocess.run(['pkg-config', '--libs', lib_target], text=True, + stdout=subprocess.PIPE).stdout.strip().split() + + if libs == "": + raise ValueError(f"Failed to get specified libs ({lib_target})") + + print(f"{lib_target}: {libs}") + + return libs + def get_lib_flags(): return subprocess.run(['pkg-config', '--libs', 'raylib'], text=True, stdout=subprocess.PIPE).stdout.strip().split() @@ -184,7 +196,11 @@ def build_unix(): if RAYLIB_PLATFORM=="SDL": extra_link_args += ['-lX11','-lSDL2'] elif RAYLIB_PLATFORM=="DRM": - extra_link_args += ['-lEGL', '-lgbm'] + extra_link_args += get_specified_libs("egl") + extra_link_args += get_specified_libs("gbm") + + if ENABLE_WAYLAND_DRM_LEASING != "": + extra_link_args += get_specified_libs("wayland-client") else: extra_link_args += ['-lX11'] extra_compile_args = ["-Wno-incompatible-pointer-types", "-D_CFFI_NO_LIMITED_API"] diff --git a/raylib/rlgl.h.modified b/raylib/rlgl.h.modified index 1695c66..1184262 100644 --- a/raylib/rlgl.h.modified +++ b/raylib/rlgl.h.modified @@ -3,7 +3,7 @@ * rlgl v5.0 - A multi-OpenGL abstraction layer with an immediate-mode style API * * DESCRIPTION: -* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0, ES 3.0) +* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0) * that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...) * * ADDITIONAL NOTES: