diff --git a/CMakeLists.txt b/CMakeLists.txt index 636bb92984..ee95232e45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1445,8 +1445,8 @@ elseif(APPLE) endif() if(SDL_FRAMEWORK_AUDIOTOOLBOX) - find_library(AUDIOTOOLBOX AudioToolbox) - list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX}) + find_package(audiotoolbox REQUIRED) + list(APPEND EXTRA_LIBS audiotoolbox::audiotoolbox) endif() if(SDL_FRAMEWORK_AUDIOUNIT) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index 767f73ec35..782bf48c5f 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -21,6 +21,9 @@ if("@APPLE@") if("@SDL_FRAMEWORK_COREAUDIO@") find_package(coreaudio REQUIRED) endif() + if("@SDL_FRAMEWORK_AUDIOTOOLBOX@") + find_package(audiotoolbox REQUIRED) + endif() if("@SDL_FRAMEWORK_AUDIOUNIT@") find_package(audiounit REQUIRED) endif()