diff options
author | Chris Robinson <[email protected]> | 2014-04-05 17:43:35 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-05 17:43:35 -0700 |
commit | f1a4b95b8cf483316025d95727b56da736546ccf (patch) | |
tree | d91744cdb61199a596a3ae26250560f84f485c6a | |
parent | 5e0fc84f49bb4f1491ff92ad0bc023b5b87ee934 (diff) |
Use FIND_LIBRARY to look for the CoreAudio framework
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cecb7e67..fd532dca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -814,12 +814,15 @@ ENDIF() # Check CoreAudio backend IF(ALSOFT_BACKEND_COREAUDIO) - CHECK_INCLUDE_FILE(/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h HAVE_COREAUDIO_FRAMEWORK) - IF(HAVE_COREAUDIO_FRAMEWORK) + FIND_LIBRARY(COREAUDIO_FRAMEWORK + NAMES CoreAudio + PATHS /System/Library/Frameworks + ) + IF(COREAUDIO_FRAMEWORK) SET(HAVE_COREAUDIO 1) SET(ALC_OBJS ${ALC_OBJS} Alc/backends/coreaudio.c) SET(BACKENDS "${BACKENDS} CoreAudio,") - SET(EXTRA_LIBS /System/Library/Frameworks/CoreAudio.framework ${EXTRA_LIBS}) + SET(EXTRA_LIBS ${COREAUDIO_FRAMEWORK} ${EXTRA_LIBS}) SET(EXTRA_LIBS /System/Library/Frameworks/AudioUnit.framework ${EXTRA_LIBS}) SET(EXTRA_LIBS /System/Library/Frameworks/ApplicationServices.framework ${EXTRA_LIBS}) |