aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-03-15 04:58:56 -0700
committerChris Robinson <[email protected]>2011-03-15 04:58:56 -0700
commitd6c8bb35b4f9af60cd1dd43c35d530937c95a3ef (patch)
tree3522bb5552597e42ab010c4d190fb14c27e14299 /CMakeLists.txt
parent4899674b6c765370f80f6e57aaddfd2985baf6e5 (diff)
Add a CoreAudio backend
Code courtesy of Garin Hiebert <[email protected]>
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)