Skip to content

Commit

Permalink
[portaudio] Update patch
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Jul 29, 2023
1 parent 656900c commit 9947a27
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions ports/portaudio/framework_link.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,24 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87d0bb832..75aa89e7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -305,17 +305,13 @@ elseif(UNIX)
target_include_directories(PortAudio PRIVATE src/hostapi/coreaudio)
set(PORTAUDIO_PUBLIC_HEADERS "${PORTAUDIO_PUBLIC_HEADERS}" include/pa_mac_core.h)
@@ -261,13 +261,13 @@ ELSE()
SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_COREAUDIO_INCLUDES})
SET(PA_SOURCES ${PA_SOURCES} ${PA_COREAUDIO_SOURCES})

- find_library(COREAUDIO_LIBRARY CoreAudio REQUIRED)
- find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox REQUIRED)
- find_library(AUDIOUNIT_LIBRARY AudioUnit REQUIRED)
- find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)
- find_library(CORESERVICES_LIBRARY CoreServices REQUIRED)
- target_link_libraries(PortAudio PRIVATE
- "${COREAUDIO_LIBRARY}"
- "${AUDIOTOOLBOX_LIBRARY}"
- "${AUDIOUNIT_LIBRARY}"
- "${COREFOUNDATION_LIBRARY}"
- "${CORESERVICES_LIBRARY}"
+ target_link_libraries(PortAudio
+ PRIVATE
- FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio REQUIRED)
- FIND_LIBRARY(AUDIOTOOLBOX_LIBRARY AudioToolbox REQUIRED)
- FIND_LIBRARY(AUDIOUNIT_LIBRARY AudioUnit REQUIRED)
- FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)
- FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices REQUIRED)
- MARK_AS_ADVANCED(COREAUDIO_LIBRARY AUDIOTOOLBOX_LIBRARY AUDIOUNIT_LIBRARY COREFOUNDATION_LIBRARY CORESERVICES_LIBRARY)
- SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${COREAUDIO_LIBRARY} ${AUDIOTOOLBOX_LIBRARY} ${AUDIOUNIT_LIBRARY} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY})
+ SET(PA_LIBRARY_DEPENDENCIES
+ ${PA_LIBRARY_DEPENDENCIES}
+ -Wl,-framework,CoreAudio
+ -Wl,-framework,AudioToolbox
+ -Wl,-framework,AudioUnit
+ -Wl,-framework,CoreFoundation
+ -Wl,-framework,CoreServices
)
target_compile_definitions(PortAudio PUBLIC PA_USE_COREAUDIO=1)
set(PKGCONFIG_CFLAGS "${PKGCONFIG_CFLAGS} -DPA_USE_COREAUDIO=1")
+ -Wl,-framework,CoreServices)
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_COREAUDIO)
SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices")
ENDIF()

0 comments on commit 9947a27

Please sign in to comment.