summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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")