libsdl2: fix PACKAGECONFIG for libusb

libusb is required to support some older low level input
devices. Meanwhile this is guarded by an option:
SDL_HIDAPI_LIBUSB

Use it for the PACKAGECONFIG to allow build with libusb support again

(From OE-Core rev: e93bc2876fb3ee488a5bc6ed03eefd1bfdcdf69a)

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Markus Volk
2025-03-05 17:55:59 +01:00
committed by Richard Purdie
parent 5d7d2981bd
commit 6ab80d3d53

View File

@@ -70,7 +70,7 @@ PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm virtual/lib
PACKAGECONFIG[libsamplerate] = "-DSDL_LIBSAMPLERATE=ON,-DSDL_LIBSAMPLERATE=OFF,libsamplerate0"
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
# so we'll just use libusb when it's available.
PACKAGECONFIG[libusb] = ",,libusb1"
PACKAGECONFIG[libusb] = "-DSDL_HIDAPI_LIBUSB=ON,-DSDL_HIDAPI_LIBUSB=OFF,libusb1"
PACKAGECONFIG[libdecor] = "-DSDL_WAYLAND_LIBDECOR=ON,-DSDL_WAYLAND_LIBDECOR=OFF,libdecor,libdecor"
PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl"
PACKAGECONFIG[pipewire] = "-DSDL_PIPEWIRE_SHARED=ON,-DSDL_PIPEWIRE_SHARED=OFF,pipewire"