package/sdl3: fix X11 dependencies
PATCH v3 1/1 package/sdl3: fix X11 dependencies
Add handling for optional X11 dependencies to fix configure errors like:
CMake Error at cmake/macros.cmake:433 (message):
Couldn't find dependency package for XCURSOR. Please install the needed packages or configure with -DSDL_X11_XCURSOR=OFF
Please note that SDL3 only checks for these dependencies when X11 support is enabled so we do not need to add =OFF options to the else- clause -DSDL_X11=OFF:
https://github.com/libsdl-org/SDL/blob/release-3.4.12/cmake/sdlchecks.cmake#L325
The problem exists since the package was added with buildroot commit 2dd13e328f118363165b47258429604a5ffd3b41 so a backport to the 2026.08.x branch should be considered.
---
v3: added configure error snippet and backport info (Thomas)
v2: added handling for xlib_libXfixes (Julien) and xlib_libXrandr
package/sdl3/sdl3.mk | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
package/sdl3/sdl3.mk +43 -0
@@ -59,6 +59,49 @@ endif ifeq ($(BR2_PACKAGE_SDL3_X11),y) SDL3_DEPENDENCIES += xlib_libX11 xlib_libXext SDL3_CONF_OPTS += -DSDL_X11=ON + +ifeq ($(BR2_PACKAGE_XAPP_XINPUT),y) +SDL3_DEPENDENCIES += xapp_xinput +SDL3_CONF_OPTS += -DSDL_X11_XINPUT=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XINPUT=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +SDL3_DEPENDENCIES += xlib_libXcursor +SDL3_CONF_OPTS += -DSDL_X11_XCURSOR=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XCURSOR=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +SDL3_DEPENDENCIES += xlib_libXfixes +SDL3_CONF_OPTS += -DSDL_X11_XFIXES=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XFIXES=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +SDL3_DEPENDENCIES += xlib_libXrandr +SDL3_CONF_OPTS += -DSDL_X11_XRANDR=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XRANDR=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y) +SDL3_DEPENDENCIES += xlib_libXScrnSaver +SDL3_CONF_OPTS += -DSDL_X11_XSCRNSAVER=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XSCRNSAVER=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXTST),y) +SDL3_DEPENDENCIES += xlib_libXtst +SDL3_CONF_OPTS += -DSDL_X11_XTEST=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XTEST=OFF +endif + else SDL3_CONF_OPTS += -DSDL_X11=OFF endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 11 lines · Bernd Kuhls
Add handling for optional X11 dependencies to fix configure errors like:
CMake Error at cmake/macros.cmake:433 (message):
Couldn't find dependency package for XCURSOR. Please install the needed packages or configure with -DSDL_X11_XCURSOR=OFFPlease note that SDL3 only checks for these dependencies when X11 support is enabled so we do not need to add =OFF options to the else- clause -DSDL_X11=OFF:
https://github.com/libsdl-org/SDL/blob/release-3.4.12/cmake/sdlchecks.cmake#L325
Quoted 5 lines
The problem exists since the package was added with buildroot commit
2dd13e328f118363165b47258429604a5ffd3b41so a backport to the 2026.08.x branch should be considered.Signed-off-by Bernd Kuhls <[email protected]>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Raphaël Mélotte via buildroot
AppliedIn reply of:
Quoted 11 lines
Add handling for optional X11 dependencies to fix configure errors like:
CMake Error at cmake/macros.cmake:433 (message):
Couldn't find dependency package for XCURSOR. Please install the needed packages or configure with -DSDL_X11_XCURSOR=OFFPlease note that SDL3 only checks for these dependencies when X11 support is enabled so we do not need to add =OFF options to the else- clause -DSDL_X11=OFF:
https://github.com/libsdl-org/SDL/blob/release-3.4.12/cmake/sdlchecks.cmake#L325
Quoted 5 lines
The problem exists since the package was added with buildroot commit
2dd13e328f118363165b47258429604a5ffd3b41so a backport to the 2026.08.x branch should be considered.Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2026.08.x. Thanks
Quoted 51 lines
---
v3: added configure error snippet and backport info (Thomas)
v2: added handling forxlib_libXfixes(Julien) andxlib_libXrandrpackage/sdl3/sdl3.mk | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)package/sdl3/sdl3.mk +36
-0@@ -59,6 +59,49 @@ endif ifeq ($(BR2_PACKAGE_SDL3_X11),y) SDL3_DEPENDENCIES += xlib_libX11 xlib_libXext SDL3_CONF_OPTS += -DSDL_X11=ON + +ifeq ($(BR2_PACKAGE_XAPP_XINPUT),y) +SDL3_DEPENDENCIES += xapp_xinput +SDL3_CONF_OPTS += -DSDL_X11_XINPUT=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XINPUT=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +SDL3_DEPENDENCIES += xlib_libXcursor +SDL3_CONF_OPTS += -DSDL_X11_XCURSOR=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XCURSOR=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +SDL3_DEPENDENCIES += xlib_libXfixes +SDL3_CONF_OPTS += -DSDL_X11_XFIXES=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XFIXES=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +SDL3_DEPENDENCIES += xlib_libXrandr +SDL3_CONF_OPTS += -DSDL_X11_XRANDR=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XRANDR=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y) +SDL3_DEPENDENCIES += xlib_libXScrnSaver +SDL3_CONF_OPTS += -DSDL_X11_XSCRNSAVER=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XSCRNSAVER=OFF +endif +
package/sdl3/sdl3.mk endif · line 107
Quoted 10 lines
package/sdl3/sdl3.mk +7
-0+ifeq ($(BR2_PACKAGE_XLIB_LIBXTST),y) +SDL3_DEPENDENCIES += xlib_libXtst +SDL3_CONF_OPTS += -DSDL_X11_XTEST=ON +else +SDL3_CONF_OPTS += -DSDL_X11_XTEST=OFF +endif + else SDL3_CONF_OPTS += -DSDL_X11=OFF endif
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot