From 756f0b80273910e16749a9cc3014a393909ef153 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Jul 2020 13:39:15 +0200 Subject: [PATCH] apple: build static library Move build rules from src/output/plugins/meson.build --- meson.build | 2 ++ src/apple/meson.build | 27 +++++++++++++++++++++++++++ src/output/plugins/meson.build | 13 +------------ 3 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 src/apple/meson.build diff --git a/meson.build b/meson.build index a9eb92798..c1e6b1322 100644 --- a/meson.build +++ b/meson.build @@ -319,6 +319,8 @@ subdir('src/thread') subdir('src/net') subdir('src/event') +subdir('src/apple') + subdir('src/lib/dbus') subdir('src/lib/icu') subdir('src/lib/smbclient') diff --git a/src/apple/meson.build b/src/apple/meson.build new file mode 100644 index 000000000..8f9f46484 --- /dev/null +++ b/src/apple/meson.build @@ -0,0 +1,27 @@ +if not is_darwin + apple_dep = dependency('', required: false) + subdir_done() +endif + +audiounit_dep = declare_dependency( + link_args: ['-framework', 'AudioUnit', '-framework', 'CoreAudio', '-framework', 'CoreServices'], + dependencies: [ + boost_dep, + ], +) + +apple = static_library( + 'apple', + 'Throw.cxx', + include_directories: inc, + dependencies: [ + audiounit_dep, + ], +) + +apple_dep = declare_dependency( + link_with: apple, + dependencies: [ + audiounit_dep, + ], +) diff --git a/src/output/plugins/meson.build b/src/output/plugins/meson.build index dde46da79..b0b7ce0b9 100644 --- a/src/output/plugins/meson.build +++ b/src/output/plugins/meson.build @@ -74,18 +74,7 @@ endif if is_darwin output_plugins_sources += [ 'OSXOutputPlugin.cxx', - '../../apple/Throw.cxx', ] - audiounit_dep = declare_dependency( - link_args: [ - '-framework', 'AudioUnit', '-framework', 'CoreAudio', '-framework', 'CoreServices', - ], - dependencies: [ - boost_dep, - ], - ) -else - audiounit_dep = dependency('', required: false) endif conf.set('HAVE_OSX', is_darwin) @@ -148,7 +137,7 @@ output_plugins = static_library( include_directories: inc, dependencies: [ alsa_dep, - audiounit_dep, + apple_dep, libao_dep, libjack_dep, pulse_dep,