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 <f_l_k@t-online.de>
Acked-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Markus Volk
2025-03-17 13:56:01 +01:00
committed by Khem Raj
parent 0c8c38ed3b
commit cfc675964b
@@ -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"