diff options
author | Chris Robinson <[email protected]> | 2008-12-07 01:05:39 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-12-07 01:05:39 -0800 |
commit | 8b54d59b8c201c90da4ec45bf81d7a945b143d10 (patch) | |
tree | 2220615745b345427f96274a91fd56c31527653f /CMakeLists.txt | |
parent | f6a4dbabdda352385073bf5cf404a0c8e29da918 (diff) |
Add an SDL backend
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") |