Following guide is based on VSTSDK v3.7.12, where Windows bundle build is fixed and AudioUnit SDK is supported.
Download or clone VSTSDK and place it where you're least likely to move/rename/etc.
To build AUv2 plugin, you need official AudioUnit SDK and the SMTG_AUDIOUNIT_SDK_PATH must be set.
Repo : https://github.com/apple/AudioUnitSDK
Clone the repo right next to vst3sdk folder so it looks like this;
Use any method you like. I used VS Code.
Clone all submodules in this repo.
Use following command in Terminal in VS Code.
git submodule init
git submodule update
Set source code directory.
Set build directory. It doesn't exiest by default, so make one.
Add CMake entry by your OS - SMTG_MAC / SMTG_WIN - and set it true.
Start cofigure and set IDE you like.
Now, all SMTG entries appeared.
Turn OFF these entries, as we don't use them here;
- SMTG_ENABLE_VST3_PLUGIN_EXAMPLES
- SMTG_ENABLE_VST3_HOSTING_EXAMPLES
- SMTG_MDA_VST3_VST2_COMPATIBLE
Click configure again to be sure.
Turn OFF next entry to build as file;
- SMTG_CREATE_BUNDLE_FOR_WINDOWS
When turned on, it will create plugin as 'bundle', which is standard in macOS and Linux.
BUT, I still prefer single file plugin.
Done!