aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9284a123..5631a3f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,7 @@ OPTION(DSOUND "Check for DirectSound backend" ON)
OPTION(WINMM "Check for Windows Multimedia backend" ON)
OPTION(PORTAUDIO "Check for PortAudio backend" ON)
OPTION(PULSEAUDIO "Check for PulseAudio backend" ON)
+OPTION(COREAUDIO "Check for CoreAudio backend" ON)
OPTION(WAVE "Enable Wave Writer backend" ON)
OPTION(DLOPEN "Check for the dlopen API for loading optional libs" ON)
@@ -340,6 +341,7 @@ SET(HAVE_DSOUND 0)
SET(HAVE_WINMM 0)
SET(HAVE_PORTAUDIO 0)
SET(HAVE_PULSEAUDIO 0)
+SET(HAVE_COREAUDIO 0)
SET(HAVE_WAVE 0)
# Check ALSA backend
@@ -446,6 +448,19 @@ IF(PULSEAUDIO)
ENDIF()
ENDIF()
+# Check CoreAudio backend
+IF(COREAUDIO)
+ CHECK_INCLUDE_FILE(/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h HAVE_COREAUDIO_FRAMEWORK)
+ IF(HAVE_COREAUDIO_FRAMEWORK)
+ SET(HAVE_COREAUDIO 1)
+ SET(ALC_OBJS ${ALC_OBJS} Alc/coreaudio.c)
+ SET(BACKENDS "${BACKENDS} CoreAudio,")
+ SET(EXTRA_LIBS /System/Library/Frameworks/CoreAudio.framework ${EXTRA_LIBS})
+ SET(EXTRA_LIBS /System/Library/Frameworks/AudioUnit.framework ${EXTRA_LIBS})
+ SET(EXTRA_LIBS /System/Library/Frameworks/ApplicationServices.framework ${EXTRA_LIBS})
+ ENDIF()
+ENDIF()
+
# Optionally enable the Wave Writer backend
IF(WAVE)
SET(HAVE_WAVE 1)