libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.51k stars 1.77k forks source link

cmake: list chosen audio/video/etc targets at the end of the output #7922

Open icculus opened 1 year ago

icculus commented 1 year ago

This is kind of silly and not urgent, but the old configure script had a super useful feature I really miss: it showed you the list of backends it was planning to build at the end of the output:

SDL2 Configure Summary:
Building Shared Libraries
Building Static Libraries
Enabled modules : atomic audio video render events joystick haptic hidapi sensor power filesystem threads timers file misc locale loadso cpuinfo assembly
Assembly Math   : mmx 3dnow sse sse2 sse3
Audio drivers   : disk dummy oss alsa(dynamic) pipewire(dynamic) pulse(dynamic) jack(dynamic) nas(dynamic) sndio(dynamic)
Video drivers   : dummy offscreen x11(dynamic) kmsdrm(dynamic) opengl opengl_es1 opengl_es2 vulkan wayland(dynamic)
X11 libraries   : xcursor xdbe xinput2 xinput2_multitouch xfixes xrandr xscrnsaver xshape
Input drivers   : linuxev linuxkd
Enable virtual joystick APIs : YES
Using libsamplerate : YES
Using libudev       : YES
Using dbus          : YES
Using ime           : YES
Using ibus          : YES
Using fcitx         : YES

The CMake output probably has all this information, but it's hard to pull it out of the "Options:" section at a quick glance.

I don't need all this information from the configure script, but the "Audio drivers" and "Video drivers" lines would be a massive improvement, for the "oh, this isn't building Wayland support? I must have forgotten a development package" moments.

(CMake does report the enabled modules, but I'm still lobbying for removing the ability to turn them off in SDL3. :) )

madebr commented 1 year ago

This might also be a good opportunity to add a strict mode to the cmake script, like is done in https://github.com/libsdl-org/SDL_mixer/pull/555 for SDL_mixer.

icculus commented 4 months ago

@madebr Should we do this for 3.2.0, or is this silly?

madebr commented 4 months ago

This can be added at any time, so I don't think it should be part of the 3.2.0 milestone. I'll take a look at this one the next time I work on the CMake scripts.