diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d418b428..415b8839 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ OPTION(OSS "Check for OSS backend" ON) OPTION(SOLARIS "Check for Solaris backend" ON) OPTION(DSOUND "Check for DirectSound backend" ON) OPTION(WINMM "Check for Windows Multimedia backend" ON) +OPTION(SDL "Check for SDL backend" ON) OPTION(DLOPEN "Check for the dlopen API for loading optional libs" ON) @@ -320,6 +321,24 @@ IF(HAVE_WINDOWS_H) ENDIF() ENDIF() +# Check SDL backend +IF(SDL) + CHECK_INCLUDE_FILE(SDL/SDL.h HAVE_SDL_SDL_H) + IF(HAVE_SDL_SDL_H) + CHECK_LIBRARY_EXISTS(SDL SDL_Init "" HAVE_LIBSDL) + IF(HAVE_DLFCN_H OR HAVE_LIBSDL) + SET(HAVE_SDL 1) + SET(ALC_OBJS ${ALC_OBJS} Alc/sdl.c) + IF(HAVE_DLFCN_H) + SET(BACKENDS "${BACKENDS} SDL,") + ELSE() + SET(BACKENDS "${BACKENDS} SDL \(linked\),") + SET(EXTRA_LIBS SDL ${EXTRA_LIBS}) + ENDIF() + ENDIF() + ENDIF() +ENDIF() + # This is always available SET(BACKENDS "${BACKENDS} WaveFile") |