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



我正试图使用Steinberg VST3项目生成器创建一个基本的新仪器插件,但我收到了以下错误:

CMakeLists.txt:12处的CMake错误(add_subdirectory(:add_subdirectory调用的参数数不正确

CMakeLists.txt:13处的CMake错误(smtg_enable_vst3_sdk(:未知CMake命令";smtg_enable_vst3_sdk";。

如何修复此问题我已经附上了生成器设置的图像,并粘贴了下面的完整脚本输出。

VST3项目生成器设置的屏幕截图链接

C:Program FilesCMakebincmake.exe C:UserswafflDownloadsvst-sdk_3.7.1_build-50_2020-11-17VST_SDKVST3_Project_GeneratorWindowsResourcesGenerateVST3Plugin.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:UserswafflDownloadsvst-sdk_3.7.1_build-50_2020-11-17VST_SDKVST3_Project_GeneratorWindowsResourcesGenerateVST3Plugin.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 FilesCMakebincmake.exe -G "Visual Studio 16 2019" -S "F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpianoGrand Piano" -B "F:/EXTRA STORAGE/vst-sdk_3.7.1_build-50_2020-11-17/VST_SDK/my_plugins/grandpianoGrand Pianobuild" -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".

我刚刚在Windows 10上尝试为cmake Visual Studio 2019生成时遇到了同样的错误,问题是我的VST3 SDK和Output目录的文件路径中的目录名中有一个空格(它们在同一目录中(。我删除了目录名中的空格,它就起作用了。您的目录名中有一个空格";额外存储";。像";EXTRA_ STORAY";或者将文件移动到另一个没有空间的目录。这对我很有效。

最新更新