glfw: add packageconfig and wayland dependencies

GLFW has the ability to use a wayland backend. This patch adds a config
for it, but does not enable it by default because it has a dependency on
extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.

Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Randolph Sapp
2023-04-27 11:47:23 -05:00
committed by Khem Raj
parent 72af3a0acb
commit c5f330bc9a
+12 -2
View File
@@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF"
CFLAGS += "-fPIC"
DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
REQUIRED_DISTRO_FEATURES = "x11 opengl"
DEPENDS = "libpng libglu zlib"
REQUIRED_DISTRO_FEATURES = "opengl"
ANY_OF_DISTRO_FEATURES = "wayland x11"
# upstream considers x11 and wayland backends mutually exclusive and will
# prioritize wayland if it is enabled, but wayland has dependencies that cannot
# be satisfied by this layer so it is disabled by default
PACKAGECONFIG ??= "x11"
PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
COMPATIBLE_HOST:libc-musl = "null"