diff --git a/README.md b/README.md index a81d1a29..59db5c9c 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ imcomplete list of things that still have to be done before this can be used: - Mention that this update will break all existing symlinks and that the old `libyabridge.so` file should be removed when upgrading. - Update all the AUR packages. +- Add CMake to the AUR package dependencies and to our Docker images ![yabridge screenshot](https://raw.githubusercontent.com/robbert-vdh/yabridge/master/screenshot.png) @@ -44,6 +45,7 @@ imcomplete list of things that still have to be done before this can be used: - [Performance tuning](#performance-tuning) - [Runtime dependencies and known issues](#runtime-dependencies-and-known-issues) - [Building](#building) + - [Building without VST3 support](#building-without-vst3-support) - [32-bit bitbridge](#32-bit-bitbridge) - [Debugging](#debugging) - [Attaching a debugger](#attaching-a-debugger) @@ -515,6 +517,7 @@ the following dependencies: - A Wine installation with `winegcc` and the development headers. The latest commits contain a workaround for a winelib [compilation issue](https://bugs.winehq.org/show_bug.cgi?id=49138) with Wine 5.7+. +- CMake for VST3 support[\*](#building-without-vst3-support) - Boost version 1.66 or higher[\*](#building-ubuntu-18.04) - libxcb @@ -545,6 +548,18 @@ After you've finished building you can follow the instructions under the would need to be installed to compile on Ubuntu 18.04. +### Building without VST3 support + +As mentioned above, building the VST3 SDK requires CMake. We might be able to +easily replace the default build definitions for the SDK with a simple +`meson.build` file in the future, but for now if you wish to build yabridge +without VST3 support then you can disable it as follows: + +```shell +# Disable VST3 support, removing the dependency on CMake +meson configure build -Dwith-vst3=false +``` + ### 32-bit bitbridge It is also possible to compile a host application for yabridge that's compatible diff --git a/meson.build b/meson.build index c2621b37..86c50b5a 100644 --- a/meson.build +++ b/meson.build @@ -37,6 +37,7 @@ compiler_options = [ with_bitbridge = get_option('with-bitbridge') with_static_boost = get_option('with-static-boost') with_winedbg = get_option('with-winedbg') +with_vst3 = get_option('with-vst3') if with_bitbridge compiler_options += '-DWITH_BITBRIDGE' @@ -68,6 +69,15 @@ tomlplusplus_dep = subproject('tomlplusplus', version : '2.1.0').get_variable('t # The built in threads dependency does not know how to handle winegcc wine_threads_dep = declare_dependency(link_args : '-lpthread') xcb_dep = dependency('xcb') +if with_vst3 + cmake = import('cmake') + vst3_sdk = cmake.subproject('vst3') + + # TODO: Assert version '3.7.1', somehow + # TODO: vst3_xxx_dep = vst3_sdk.dependency('xxx') +else + message('VST3 support has been disabled') +endif include_dir = include_directories('src/include') diff --git a/meson_options.txt b/meson_options.txt index bca9126c..319d0d54 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,6 +12,13 @@ option( description : 'Enable static linking for Boost. Needed when distributing the binaries to other systems.' ) +option( + 'with-vst3', + type : 'boolean', + value : true, + description : 'Whether to build the VST3 version of yabridge. This requires CMake to be installed.' +) + option( 'with-winedbg', type : 'boolean', diff --git a/subprojects/.gitignore b/subprojects/.gitignore index 21ced76b..e557da5e 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -2,3 +2,4 @@ # The above pattern doesn't match submodules /tomlplusplus +/vst3 diff --git a/subprojects/vst3.wrap b/subprojects/vst3.wrap new file mode 100644 index 00000000..aed03c6a --- /dev/null +++ b/subprojects/vst3.wrap @@ -0,0 +1,7 @@ +[wrap-git] +url = https://github.com/robbert-vdh/vst3sdk.git +# This is VST3 SDK v3.7.1_build_50 with the documentation and VSTGUI submodules +# removed +revision = 2a1a230d45766532360a2f432083f0795f2b0d93 +clone-recursive = true +depth = 1