aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-03-10 00:55:29 -0700
committerChris Robinson <[email protected]>2009-03-10 00:55:29 -0700
commit86931cbde425a092527fd873e770ea5a617138da (patch)
tree0407878bd4dc324adf44b239e59cb00ecff4bd58 /CMakeLists.txt
parent6d7be151dc11e99d0798786fe3fbe89dbd116816 (diff)
Add a PortAudio backend
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 137fbabe..050b75f5 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(PORTAUDIO "Check for PortAudio backend" ON)
OPTION(SDL "Check for SDL backend" ON)
OPTION(DLOPEN "Check for the dlopen API for loading optional libs" ON)
@@ -321,6 +322,24 @@ IF(HAVE_WINDOWS_H)
ENDIF()
ENDIF()
+# Check PortAudio backend
+IF(PORTAUDIO)
+ CHECK_INCLUDE_FILE(portaudio.h HAVE_PORTAUDIO_H)
+ IF(HAVE_PORTAUDIO_H)
+ CHECK_LIBRARY_EXISTS(portaudio Pa_Initialize "" HAVE_LIBPORTAUDIO)
+ IF(HAVE_LIBPORTAUDIO)
+ SET(HAVE_PORTAUDIO 1)
+ SET(ALC_OBJS ${ALC_OBJS} Alc/portaudio.c)
+ IF(HAVE_DLFCN_H)
+ SET(BACKENDS "${BACKENDS} PortAudio,")
+ ELSE()
+ SET(BACKENDS "${BACKENDS} PortAudio \(linked\),")
+ SET(EXTRA_LIBS portaudio ${EXTRA_LIBS})
+ ENDIF()
+ ENDIF()
+ ENDIF()
+ENDIF()
+
# Check SDL backend
IF(SDL)
CHECK_INCLUDE_FILE(SDL.h HAVE_SDL_H)