I'm trying to create a basic new instrument plug-in using the Steinberg VST3 Project Generator, but I'm getting the following error:
CMake Error at CMakeLists.txt:12 (add_subdirectory): add_subdirectory called with incorrect number of arguments
CMake Error at CMakeLists.txt:13 (smtg_enable_vst3_sdk): Unknown CMake command "smtg_enable_vst3_sdk".
How can I fix this? I've attached an image of the settings for the generator and pasted the full script output below.
A link to a screenshot with the settings of the VST3 Project Generator
C:\Program Files\CMake\bin\cmake.exe C:\Users\waffl\Downloads\vst-sdk_3.7.1_build-50_2020-11-17\VST_SDK\VST3_Project_Generator\Windows\Resources\GenerateVST3Plugin.cmake -DSMTG_VST3_SDK_SOURCE_DIR_CLI="F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/VST3_SDK" -DSMTG_GENERATOR_OUTPUT_DIRECTORY_CLI="F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano" -DSMTG_PLUGIN_NAME_CLI="Grand Piano" -DSMTG_PLUGIN_CATEGORY_CLI="Instrument" -DSMTG_CMAKE_PROJECT_NAME_CLI="Grand_Piano" -DSMTG_PLUGIN_BUNDLE_NAME_CLI="Grand Piano" -DSMTG_PLUGIN_IDENTIFIER_CLI="com.jonathanvardouniotis.grandpiano" -DSMTG_VENDOR_NAME_CLI="Jonathan Vardouniotis" -DSMTG_VENDOR_HOMEPAGE_CLI="https://www.thejonathanv.com" -DSMTG_VENDOR_EMAIL_CLI="support@thejonathanv.com" -DSMTG_PREFIX_FOR_FILENAMES_CLI="GrandPiano" -DSMTG_VENDOR_NAMESPACE_CLI="GrandPiano" -DSMTG_PLUGIN_CLASS_NAME_CLI="Grand_Piano" -DSMTG_ENABLE_VSTGUI_SUPPORT_CLI=ON -P "C:\Users\waffl\Downloads\vst-sdk_3.7.1_build-50_2020-11-17\VST_SDK\VST3_Project_Generator\Windows\Resources\GenerateVST3Plugin.cmake"
==================================================
Steinberg Media Technologies GmbH
VST3 Project Generator
==================================================
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.28.0.windows.1")
-- SMTG_CMAKE_SCRIPT_DIR : C:/Users/waffl/Downloads/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/VST3_Project_Generator/Windows/Resources
-- SMTG_ENABLE_VSTGUI_SUPPORT : ON
-- SMTG_GENERATOR_OUTPUT_DIRECTORY : F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano
-- SMTG_TEMPLATE_FILES_PATH : C:/Users/waffl/Downloads/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/VST3_Project_Generator/Windows/Resources/cmake/templates
-- SMTG_VST3_SDK_SOURCE_DIR : F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/VST3_SDK
-- SMTG_VENDOR_NAME : Jonathan Vardouniotis
-- SMTG_VENDOR_HOMEPAGE : https://www.thejonathanv.com
-- SMTG_VENDOR_EMAIL : support@thejonathanv.com
-- SMTG_SOURCE_COPYRIGHT_HEADER: Copyright(c) 2020 Jonathan Vardouniotis.
-- SMTG_PLUGIN_NAME : Grand Piano
-- SMTG_PREFIX_FOR_FILENAMES : e.g. GrandPianocontroller.h
-- SMTG_PLUGIN_IDENTIFIER : com.jonathanvardouniotis.grandpiano, used e.g. in Info.plist
-- SMTG_PLUGIN_BUNDLE_NAME : Grand Piano
-- SMTG_CMAKE_PROJECT_NAME : e.g. Grand_Piano will output Grand_Piano.vst3
-- SMTG_VENDOR_NAMESPACE : e.g. namespace GrandPiano {...}
-- SMTG_PLUGIN_CLASS_NAME : e.g. class Grand_PianoProcessor : public AudioEffect {...}
-- SMTG_PLUGIN_CATEGORY : Instrument
-- SMTG_Processor_UUID : 0xA9CE2568, 0xD0F95BCF, 0xA31C76FB, 0xBC6229DF
-- SMTG_Controller_UUID : 0xF388EFE7, 0xCAD15CC8, 0x9FC50FB6, 0x86CA74B1
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/CMakeLists.txt
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/resource/Info.plist
-- Copied : F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/resource/A9CE2568D0F95BCFA31C76FBBC6229DF_snapshot.png
-- Copied : F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/resource/A9CE2568D0F95BCFA31C76FBBC6229DF_snapshot_2.0x.png
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/resource/GrandPianoeditor.uidesc
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/resource/win32resource.rc
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/source/version.h
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/source/GrandPianocids.h
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/source/GrandPianocontroller.cpp
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/source/GrandPianocontroller.h
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/source/GrandPianoentry.cpp
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/source/GrandPianoprocessor.cpp
-- Configured: F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/source/GrandPianoprocessor.h
C:\Program Files\CMake\bin\cmake.exe -G "Visual Studio 16 2019" -S "F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano\Grand Piano" -B "F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano\Grand Piano\build" -DSMTG_ADD_VSTGUI=ON
-- The C compiler identification is MSVC 19.28.29304.1
-- The CXX compiler identification is MSVC 19.28.29304.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.28.29304/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.28.29304/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:12 (add_subdirectory):
add_subdirectory called with incorrect number of arguments
CMake Error at CMakeLists.txt:13 (smtg_enable_vst3_sdk):
Unknown CMake command "smtg_enable_vst3_sdk".
-- Configuring incomplete, errors occurred!
See also "F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpiano/Grand Piano/build/CMakeFiles/CMakeOutput.log".
I just had this same error on Windows 10 trying to generate for cmake Visual Studio 2019, and the problem for me was that I had a space in a directory name in the file path to my VST3 SDK and Output directory (they were in the same directory). I removed the space in the directory name and it worked. You have a space in your directory name "EXTRA STORAGE". Remove that space like "EXTRA_STORAGE" or move your files to another directory that does not have a space. That worked for me.