diff options
author | Chris Robinson <[email protected]> | 2022-08-21 17:47:56 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-08-21 17:47:56 -0700 |
commit | 415815cff7997fb2708b15753ae84c7384bd298a (patch) | |
tree | f96656bce280365e1a4d828651dda3761998c1d1 /CMakeLists.txt | |
parent | 6815926cc52e66bb2d27c1f0cfddb385c9e279e4 (diff) |
Don't include the full path for frameworks to link
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c712a16a..8ed55f4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1086,19 +1086,22 @@ if(COREAUDIO_FRAMEWORK AND AUDIOUNIT_INCLUDE_DIR) set(HAVE_COREAUDIO 1) set(ALC_OBJS ${ALC_OBJS} alc/backends/coreaudio.cpp alc/backends/coreaudio.h) set(BACKENDS "${BACKENDS} CoreAudio,") + + set(EXTRA_LIBS -Wl,-framework,CoreAudio ${EXTRA_LIBS}) if(CMAKE_SYSTEM_NAME STREQUAL "iOS") find_library(COREFOUNDATION_FRAMEWORK NAMES CoreFoundation) - set(EXTRA_LIBS ${COREAUDIO_FRAMEWORK} ${COREFOUNDATION_FRAMEWORK} ${EXTRA_LIBS}) + if(COREFOUNDATION_FRAMEWORK) + set(EXTRA_LIBS -Wl,-framework,CoreFoundation ${EXTRA_LIBS}) + endif() else() - set(EXTRA_LIBS ${COREAUDIO_FRAMEWORK} /System/Library/Frameworks/AudioUnit.framework - /System/Library/Frameworks/ApplicationServices.framework ${EXTRA_LIBS}) + set(EXTRA_LIBS -Wl,-framework,AudioUnit,-framework,ApplicationServices ${EXTRA_LIBS}) endif() # Some versions of OSX may need the AudioToolbox framework. Add it if # it's found. find_library(AUDIOTOOLBOX_LIBRARY NAMES AudioToolbox) if(AUDIOTOOLBOX_LIBRARY) - set(EXTRA_LIBS ${AUDIOTOOLBOX_LIBRARY} ${EXTRA_LIBS}) + set(EXTRA_LIBS -Wl,-framework,AudioToolbox ${EXTRA_LIBS}) endif() set(INC_PATHS ${INC_PATHS} ${AUDIOUNIT_INCLUDE_DIR}) |