I have used the vst3projectgenerator to create a new project that builds and runs just fine. I want to change the name of the cmake target though and have it different compared to the generated binary. So I changed the line
smtg_add_vst3plugin(myPlugin ....)
to
smtg_add_vst3plugin_with_pkgname(myPlugin_vst myPlugin ...)
to have separeted targets for aax and vst but the same binary name.
But when changed to this
smtg_add_vst3plugin_with_pkgname
and also updated all the references to myPlugin to myPlugin_vst in the CMakeLists.txt I get all of this error:
[main] Building folder: myPlugin
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build C:/Users/wjwvcx/Desktop/Deveplopment/plugins/myPlugin/build --config Debug --target myPlugin_vst -j 14 --
[build] MSBuild version 17.4.0+18d5aef85 for .NET Framework
[build] pluginterfaces.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\lib\Debug\pluginterfaces.lib
[build] base.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\lib\Debug\base.lib
[build] vstgui.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\lib\Debug\vstgui.lib
[build] sdk_common.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\lib\Debug\sdk_common.lib
[build] sdk_hosting.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\lib\Debug\sdk_hosting.lib
[build] sdk.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\lib\Debug\sdk.lib
[build] vstgui_uidescription.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\lib\Debug\vstgui_uidescription.lib
[build] moduleinfotool.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\bin\Debug\moduleinfotool.exe
[build] vstgui_support.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\lib\Debug\vstgui_support.lib
[build] [SMTG] Copied resource/myPlugineditor.uidesc to C:/Users/wjwvcx/Desktop/Deveplopment/plugins/myPlugin/build/VST3/Debug/myPlugin.vst3/Contents/Resources
[build] [SMTG] Copied resource/font/ArtDystopia.ttf to C:/Users/wjwvcx/Desktop/Deveplopment/plugins/myPlugin/build/VST3/Debug/myPlugin.vst3/Contents/Resources/fonts
[build] myPlugin_vst.vcxproj -> C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\VST3\Debug\myPlugin.vst3\Contents\x86_64-win\myPlugin_vst.vst3
[build] LoadLibray failed: Access is denied.
[build]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: The command "setlocal [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: cd C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\bin [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: C: [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\bin\Debug\moduleinfotool.exe -create -version 1.0.0.0 -path C:/Users/wjwvcx/Desktop/Deveplopment/plugins/myPlugin/build/VST3/Debug/myPlugin.vst3 -output C:/Users/wjwvcx/Desktop/Deveplopment/plugins/myPlugin/build/VST3/Debug/myPlugin.vst3/Contents/moduleinfo.json [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: :cmEnd [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: :cmErrorLevel [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: exit /b %1 [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: :cmDone [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: :VCEnd" exited with code 1. [C:\Users\wjwvcx\Desktop\Deveplopment\plugins\myPlugin\build\myPlugin_vst.vcxproj]
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build C:/Users/wjwvcx/Desktop/Deveplopment/plugins/myPlugin/build --config Debug --target myPlugin_vst -j 14 -- exited with code: 1
[driver] Build completed: 00:00:06.185
[build] Build finished with exit code 1
Am I doing something wrong or is the smtg_add_vst3plugin_with_pkgname cmake-function broken?