CMake: Support SDL audio back-end

Rename UNIX_SOUND_SRC_SDL to UNIX_SOUND_SDL_SRC to match the
signature of other variables (ending with _HDR or _SRC).
This commit is contained in:
Maarten Bent
2018-12-01 13:42:53 +01:00
parent 97f64e9941
commit 271ed4d990
8 changed files with 204 additions and 5 deletions

View File

@@ -268,4 +268,15 @@ if(wxUSE_GUI)
wx_option_force_value(wxUSE_MEDIACTRL OFF)
endif()
endif()
if(UNIX AND wxUSE_LIBSDL)
find_package(SDL2)
if(NOT SDL2_FOUND)
find_package(SDL)
endif()
if(NOT SDL2_FOUND AND NOT SDL_FOUND)
message(WARNING "SDL not found, SDL Audio back-end won't be available")
wx_option_force_value(wxUSE_LIBSDL OFF)
endif()
endif()
endif()