aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-04-16 05:17:42 -0700
committerChris Robinson <[email protected]>2009-04-16 05:17:42 -0700
commita2adbb1ab50e788006322264bc41535e5acee116 (patch)
tree92f93a446e59adc5620980a4db3569235389b2e2 /CMakeLists.txt
parenta97fc792d8292dd63ac3f7b78eae1a76b9eb0e0c (diff)
Add a PulseAudio backend
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59c8c78d..749e0122 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,8 @@ 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(PORTAUDIO "Check for PortAudio backend" ON)
+OPTION(PULSEAUDIO "Check for PulseAudio backend" ON)
OPTION(DLOPEN "Check for the dlopen API for loading optional libs" ON)
@@ -341,6 +342,21 @@ IF(PORTAUDIO)
ENDIF()
ENDIF()
+# Check PortAudio backend
+IF(PULSEAUDIO)
+ CHECK_INCLUDE_FILE(pulse/pulseaudio.h HAVE_PULSE_PULSEAUDIO_H)
+ IF(HAVE_PULSE_PULSEAUDIO_H)
+ CHECK_LIBRARY_EXISTS(pulse pa_context_new "" HAVE_LIBPULSE)
+ IF(HAVE_LIBPULSE)
+ SET(HAVE_PULSEAUDIO 1)
+ SET(ALC_OBJS ${ALC_OBJS} Alc/pulseaudio.c)
+ SET(BACKENDS "${BACKENDS} PulseAudio \(linked\),")
+
+ SET(EXTRA_LIBS pulse ${EXTRA_LIBS})
+ ENDIF()
+ ENDIF()
+ENDIF()
+
# This is always available
SET(BACKENDS "${BACKENDS} WaveFile")