Steinberg VST3 项目生成器 CMake 中的错误 - "add_subdirectory called with incorrect number of arguements"

Error in Steinberg VST3 Project Generator CMake - "add_subdirectory called with incorrect number of arguements"

我正在尝试使用 Steinberg VST3 项目生成器创建一个基本的新乐器插件,但出现以下错误:

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".

我该如何解决这个问题? 我附上了生成器设置的图片,并在下面粘贴了完整的脚本输出。

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".

我刚刚在尝试为 cmake Visual Studio 2019 生成 Windows 10 时遇到了同样的错误,对我来说问题是我在目录名称中有一个 space我的 VST3 SDK 和输出目录的文件路径(它们在同一目录中)。我删除了目录名称中的 space 并且它起作用了。您的目录名称“EXTRA STORAGE”中有一个 space。删除 space,如“EXTRA_STORAGE”,或将文件移动到另一个没有 space 的目录。这对我有用。