diff --git a/meson.build b/meson.build index 6099b535..294fb5f8 100644 --- a/meson.build +++ b/meson.build @@ -257,17 +257,7 @@ shared_library( vst2_plugin_sources, native : true, include_directories : include_dir, - dependencies : [ - configuration_dep, - - asio_dep, - bitsery_dep, - dl_dep, - ghc_filesystem_dep, - rt_dep, - threads_dep, - tomlplusplus_dep, - ], + dependencies : vst2_plugin_deps, # NOTE: LTO does not support Winelibs, and it seems to break # `libyabridge-vst2.so` in Bitwig for some reason. It should be left # turned off for the time being except for on the chainloader @@ -278,13 +268,7 @@ shared_library( 'yabridge-chainloader-vst2', vst2_chainloader_sources, native : true, - dependencies : [ - configuration_dep, - - dl_dep, - ghc_filesystem_dep, - rt_dep, - ], + dependencies : chainloader_deps, cpp_args : compiler_options + chainloader_compiler_options, # LTO is useful here to get rid of unused code override_options : ['b_lto=true'], @@ -298,32 +282,14 @@ if with_vst3 vst3_plugin_sources, native : true, include_directories : include_dir, - dependencies : [ - configuration_dep, - - asio_dep, - bitsery_dep, - dl_dep, - function2_dep, - ghc_filesystem_dep, - rt_dep, - threads_dep, - tomlplusplus_dep, - vst3_sdk_native_dep, - ], + dependencies : vst3_plugin_deps, cpp_args : compiler_options, ) shared_library( 'yabridge-chainloader-vst3', vst3_chainloader_sources, native : true, - dependencies : [ - configuration_dep, - - dl_dep, - ghc_filesystem_dep, - rt_dep, - ], + dependencies : chainloader_deps, cpp_args : compiler_options + chainloader_compiler_options, # See above override_options : ['b_lto=true'], diff --git a/src/chainloader/meson.build b/src/chainloader/meson.build index 622904f6..80f43614 100644 --- a/src/chainloader/meson.build +++ b/src/chainloader/meson.build @@ -1,6 +1,14 @@ # Like for the other libraries, the actual `shared_library()` call is in the # main `meson.build` file so everything gets bundled to a single directory. +chainloader_deps = [ + configuration_dep, + + dl_dep, + ghc_filesystem_dep, + rt_dep, +] + vst2_chainloader_sources = files( '../common/logging/common.cpp', '../common/linking.cpp', diff --git a/src/plugin/meson.build b/src/plugin/meson.build index 17183ed3..70862592 100644 --- a/src/plugin/meson.build +++ b/src/plugin/meson.build @@ -1,6 +1,33 @@ # We only define the sources here, because calling `shared_library()` here will # cause the `libyabridge-*.so` files to be generated in a deeply nested # subdirectory of `build/` + +vst2_plugin_deps = [ + configuration_dep, + + asio_dep, + bitsery_dep, + dl_dep, + ghc_filesystem_dep, + rt_dep, + threads_dep, + tomlplusplus_dep, +] + +vst3_plugin_deps = [ + configuration_dep, + + asio_dep, + bitsery_dep, + dl_dep, + function2_dep, + ghc_filesystem_dep, + rt_dep, + threads_dep, + tomlplusplus_dep, + vst3_sdk_native_dep, +] + vst2_plugin_sources = files( '../common/communication/common.cpp', '../common/communication/vst2.cpp',