From cfc675964b7b4027ff142c592e0f0b0daae391eb Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Mon, 17 Mar 2025 13:56:01 +0100 Subject: [PATCH] libsdl3: add fallback to console-build This fixes a configure error if neither wayland nor x11 are available: | CMake Error at cmake/macros.cmake:382 (message): | SDL could not find X11 or Wayland development libraries on your system. | This means SDL will not be able to create windows on a typical unix | operating system. Most likely, this is not wanted. | | On Linux, install the packages listed at | https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies | | | If you really don't need desktop windows, the documentation tells you how | to skip this check. | https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md#cmake-fails-to-build-without-x11-or-wayland-supp Signed-off-by: Markus Volk Acked-by: Martin Jansa Signed-off-by: Khem Raj --- meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb b/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb index 63a78907b0..86a0ae6b50 100644 --- a/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb +++ b/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb @@ -55,9 +55,11 @@ PACKAGECONFIG ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio pipewire x11 vulkan', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \ ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \ + ${@bb.utils.contains_any("DISTRO_FEATURES", "x11 wayland","","console-build",d)} \ " PACKAGECONFIG[alsa] = "-DSDL_ALSA=ON,-DSDL_ALSA=OFF,alsa-lib," PACKAGECONFIG[arm-neon] = "-DSDL_ARMNEON=ON,-DSDL_ARMNEON=OFF" +PACKAGECONFIG[console-build] = "-DSDL_UNIX_CONSOLE_BUILD=ON" PACKAGECONFIG[gles2] = "-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2" PACKAGECONFIG[jack] = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack" PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm virtual/libgbm"