@@ -334,6 +334,32 @@ if(APPLE)
334
334
endif ()
335
335
endif ()
336
336
337
+ function (PrintEnabledBackends _SUBSYS _REGEXP)
338
+ get_cmake_property (_ALLVARS VARIABLES )
339
+ foreach (_VAR IN LISTS _ALLVARS)
340
+ string (REGEX MATCH "${_REGEXP} " _MATCH "${_VAR} " )
341
+ if (_MATCH)
342
+ if (${_VAR} )
343
+ string (TOLOWER "${CMAKE_MATCH_1} " _LOWERED)
344
+ if (NOT _LOWERED STREQUAL "available" AND NOT _LOWERED STREQUAL "default" ) # a little hack
345
+ if (${_VAR} _DYNAMIC)
346
+ list (APPEND _ENABLED_BACKENDS "${_LOWERED} (dynamic)" )
347
+ else ()
348
+ list (APPEND _ENABLED_BACKENDS "${_LOWERED} " )
349
+ endif ()
350
+ endif ()
351
+ endif ()
352
+ endif ()
353
+ endforeach ()
354
+
355
+ if (_ENABLED_BACKENDS STREQUAL "" )
356
+ set (_SPACEDOUT "(none)" )
357
+ else ()
358
+ string (REPLACE ";" " " _SPACEDOUT "${_ENABLED_BACKENDS} " )
359
+ endif ()
360
+ message (STATUS " ${_SUBSYS} : ${_SPACEDOUT} " )
361
+ endfunction ()
362
+
337
363
function (SDL_PrintSummary)
338
364
##### Info output #####
339
365
message (STATUS "" )
@@ -366,6 +392,18 @@ function(SDL_PrintSummary)
366
392
message (STATUS " Build libraries as Apple Framework: ${SDL_FRAMEWORK} " )
367
393
endif ()
368
394
message (STATUS "" )
395
+
396
+ message (STATUS "Enabled backends:" )
397
+ PrintEnabledBackends("Video drivers" "^SDL_VIDEO_DRIVER_([A-Z0-9]*)$" )
398
+ if (SDL_VIDEO_DRIVER_X11)
399
+ PrintEnabledBackends("X11 libraries" "^SDL_VIDEO_DRIVER_X11_([A-Z0-9]*)$" )
400
+ endif ()
401
+ PrintEnabledBackends("Render drivers" "^SDL_VIDEO_RENDER_([A-Z0-9]*)$" )
402
+ PrintEnabledBackends("GPU drivers" "^SDL_GPU_([A-Z0-9]*)$" )
403
+ PrintEnabledBackends("Audio drivers" "^SDL_AUDIO_DRIVER_([A-Z0-9]*)$" )
404
+ PrintEnabledBackends("Joystick drivers" "^SDL_JOYSTICK_([A-Z0-9]*)$" )
405
+ message (STATUS "" )
406
+
369
407
if (UNIX )
370
408
message (STATUS "If something was not detected, although the libraries" )
371
409
message (STATUS "were installed, then make sure you have set the" )
0 commit comments