diff --git a/ports-legacy/meson.build b/ports-legacy/meson.build index 85696e87..b417f39f 100644 --- a/ports-legacy/meson.build +++ b/ports-legacy/meson.build @@ -75,21 +75,6 @@ plugin_include_dirs = [ dependencies_plugin = [ ] -if os_darwin - dependencies_plugin += [ - dependency('Accelerate', method: 'extraframework'), - dependency('AudioToolbox', method: 'extraframework'), - dependency('Carbon', method: 'extraframework'), - dependency('Cocoa', method: 'extraframework'), - dependency('CoreAudio', method: 'extraframework'), - dependency('CoreAudioKit', method: 'extraframework'), - dependency('CoreMIDI', method: 'extraframework'), - dependency('IOKit', method: 'extraframework'), - dependency('QuartzCore', method: 'extraframework'), - dependency('WebKit', method: 'extraframework'), - ] -endif - if os_windows dependencies_plugin += [ cc.find_library('comdlg32'), @@ -126,32 +111,6 @@ if optimizations and not linux_embed ] endif -############################################################################### -# link flags for plugins - -link_flags_plugin_lv2 = [ -] -link_flags_plugin_vst2 = [ -] - -if os_darwin - link_flags_plugin_lv2 += [ - '-Wl,-exported_symbol,_lv2_generate_ttl', - '-Wl,-exported_symbol,_lv2_descriptor', - '-Wl,-exported_symbol,_lv2ui_descriptor', - ] - link_flags_plugin_vst2 += [ - '-Wl,-exported_symbol,_VSTPluginMain', - ] -else - link_flags_plugin_lv2 += [ - '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-lv2.version', - ] - link_flags_plugin_vst2 += [ - '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-vst2.version', - ] -endif - ############################################################################### # combine flags depending on build type @@ -162,7 +121,7 @@ else endif ############################################################################### -# format-specific flags +# format-specific build flags build_flags_plugin_lv2 = [ '-DJucePlugin_Build_AU=0', @@ -184,6 +143,43 @@ build_flags_plugin_vst2 = [ '-Wno-write-strings', ] +############################################################################### +# format-specific link flags + +link_flags_plugin_common = [ +] + +if os_darwin + link_flags_plugin_common += [ + '-framework', 'Accelerate', + '-framework', 'AudioToolbox', + '-framework', 'AudioUnit', + '-framework', 'Carbon', + '-framework', 'Cocoa', + '-framework', 'CoreAudio', + '-framework', 'CoreAudioKit', + '-framework', 'CoreMIDI', + '-framework', 'IOKit', + '-framework', 'QuartzCore', + '-framework', 'WebKit', + ] + link_flags_plugin_lv2 = [ + '-Wl,-exported_symbol,_lv2_generate_ttl', + '-Wl,-exported_symbol,_lv2_descriptor', + '-Wl,-exported_symbol,_lv2ui_descriptor', + ] + link_flags_plugin_vst2 = [ + '-Wl,-exported_symbol,_VSTPluginMain', + ] +else + link_flags_plugin_lv2 = [ + '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-lv2.version', + ] + link_flags_plugin_vst2 = [ + '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-vst2.version', + ] +endif + ############################################################################### build_flags_drowaudio = [ @@ -229,8 +225,8 @@ if build_lv2 or build_vst2 if plugin_uses_opengl if os_darwin - plugin_extra_dependencies += [ - dependency('OpenGL', method: 'extraframework'), + plugin_extra_link_flags += [ + '-framework', 'OpenGL', ] elif os_windows plugin_extra_dependencies += [ @@ -271,7 +267,7 @@ if build_lv2 or build_vst2 ], c_args: build_flags + build_flags_plugin + build_flags_plugin_lv2 + plugin_extra_build_flags, cpp_args: build_flags_cpp + build_flags_plugin + build_flags_plugin_lv2 + plugin_extra_build_flags, - link_args: link_flags + link_flags_plugin_lv2, + link_args: link_flags + link_flags_plugin_common + link_flags_plugin_lv2, link_with: link_with_plugin, ) @@ -302,7 +298,7 @@ if build_lv2 or build_vst2 ], c_args: build_flags + build_flags_plugin + build_flags_plugin_vst2 + plugin_extra_build_flags, cpp_args: build_flags_cpp + build_flags_plugin + build_flags_plugin_vst2 + plugin_extra_build_flags, - link_args: link_flags + link_flags_plugin_vst2, + link_args: link_flags + link_flags_plugin_common + link_flags_plugin_vst2, link_with: link_with_plugin, install: true, install_dir: vst2dir, diff --git a/ports/meson.build b/ports/meson.build index 873c7484..08011022 100644 --- a/ports/meson.build +++ b/ports/meson.build @@ -23,22 +23,6 @@ plugin_include_dirs = [ dependencies_plugin = [ ] -if os_darwin - dependencies_plugin += [ - dependency('Accelerate', method: 'extraframework'), - dependency('AudioToolbox', method: 'extraframework'), - dependency('AudioUnit', method: 'extraframework'), - dependency('Carbon', method: 'extraframework'), - dependency('Cocoa', method: 'extraframework'), - dependency('CoreAudio', method: 'extraframework'), - dependency('CoreAudioKit', method: 'extraframework'), - dependency('CoreMIDI', method: 'extraframework'), - dependency('IOKit', method: 'extraframework'), - dependency('QuartzCore', method: 'extraframework'), - dependency('WebKit', method: 'extraframework'), - ] -endif - if os_windows dependencies_plugin += [ cc.find_library('comdlg32'), @@ -79,42 +63,6 @@ if optimizations and not linux_embed ] endif -############################################################################### -# link flags for plugins - -link_flags_plugin_lv2 = [ -] -link_flags_plugin_vst2 = [ -] -link_flags_plugin_vst3 = [ -] - -if os_darwin - link_flags_plugin_lv2 += [ - '-Wl,-exported_symbol,_lv2_generate_ttl', - '-Wl,-exported_symbol,_lv2_descriptor', - '-Wl,-exported_symbol,_lv2ui_descriptor', - ] - link_flags_plugin_vst2 += [ - '-Wl,-exported_symbol,_VSTPluginMain', - ] - link_flags_plugin_vst3 += [ - '-Wl,-exported_symbol,_bundleEntry', - '-Wl,-exported_symbol,_bundleExit', - '-Wl,-exported_symbol,_GetPluginFactory', - ] -else - link_flags_plugin_lv2 += [ - '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-lv2.version', - ] - link_flags_plugin_vst2 += [ - '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-vst2.version', - ] - link_flags_plugin_vst3 += [ - '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-vst3.version', - ] -endif - ############################################################################### # combine flags depending on build type @@ -125,7 +73,7 @@ else endif ############################################################################### -# format-specific flags +# format-specific build flags build_flags_plugin_lv2 = [ '-DJucePlugin_Build_AU=0', @@ -168,6 +116,51 @@ if os_windows ] endif +############################################################################### +# format-specific link flags + +link_flags_plugin_common = [ +] + +if os_darwin + link_flags_plugin_common += [ + '-framework', 'Accelerate', + '-framework', 'AudioToolbox', + '-framework', 'AudioUnit', + '-framework', 'Carbon', + '-framework', 'Cocoa', + '-framework', 'CoreAudio', + '-framework', 'CoreAudioKit', + '-framework', 'CoreMIDI', + '-framework', 'IOKit', + '-framework', 'QuartzCore', + '-framework', 'WebKit', + ] + link_flags_plugin_lv2 = [ + '-Wl,-exported_symbol,_lv2_generate_ttl', + '-Wl,-exported_symbol,_lv2_descriptor', + '-Wl,-exported_symbol,_lv2ui_descriptor', + ] + link_flags_plugin_vst2 = [ + '-Wl,-exported_symbol,_VSTPluginMain', + ] + link_flags_plugin_vst3 = [ + '-Wl,-exported_symbol,_bundleEntry', + '-Wl,-exported_symbol,_bundleExit', + '-Wl,-exported_symbol,_GetPluginFactory', + ] +else + link_flags_plugin_lv2 = [ + '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-lv2.version', + ] + link_flags_plugin_vst2 = [ + '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-vst2.version', + ] + link_flags_plugin_vst3 = [ + '-Wl,--version-script=' + meson.source_root() + '/scripts/plugin-symbols-vst3.version', + ] +endif + ############################################################################### foreach plugin : plugins @@ -188,8 +181,8 @@ foreach plugin : plugins if plugin_uses_opengl if os_darwin - plugin_extra_dependencies += [ - dependency('OpenGL', method: 'extraframework'), + plugin_extra_link_flags += [ + '-framework', 'OpenGL', ] elif os_windows plugin_extra_dependencies += [ @@ -228,7 +221,7 @@ foreach plugin : plugins ], c_args: build_flags + build_flags_plugin + build_flags_plugin_lv2 + plugin_extra_build_flags, cpp_args: build_flags_cpp + build_flags_plugin + build_flags_plugin_lv2 + build_flag_plugin_cpp + plugin_extra_build_flags, - link_args: link_flags + link_flags_plugin_lv2, + link_args: link_flags + link_flags_plugin_common + link_flags_plugin_lv2, link_with: [ lib_juce_current, plugin_lib ], ) @@ -259,7 +252,7 @@ foreach plugin : plugins ], c_args: build_flags + build_flags_plugin + build_flags_plugin_vst2 + plugin_extra_build_flags, cpp_args: build_flags_cpp + build_flags_plugin + build_flags_plugin_vst2 + build_flag_plugin_cpp + plugin_extra_build_flags, - link_args: link_flags + link_flags_plugin_vst2, + link_args: link_flags + link_flags_plugin_common + link_flags_plugin_vst2, link_with: [ lib_juce_current, plugin_lib ], install: true, install_dir: vst2dir, @@ -277,7 +270,7 @@ foreach plugin : plugins ], c_args: build_flags + build_flags_plugin + build_flags_plugin_vst3 + plugin_extra_build_flags, cpp_args: build_flags_cpp + build_flags_plugin + build_flags_plugin_vst3 + build_flag_plugin_cpp + plugin_extra_build_flags, - link_args: link_flags + link_flags_plugin_vst3, + link_args: link_flags + link_flags_plugin_common + link_flags_plugin_vst3, link_with: [ lib_juce_current, plugin_lib ], )