Closed suzumushi0 closed 1 year ago
Same issue here. Probably related to: cmake/modules/SMTG_AddSMTGLibrary.cmake
- if(MSVC)
- # Hacky workaround: replace all SMTG_PLUGIN_PACKAGE_NAME (e.g. again.vst3)
- # occurences by a MSVS macro $(TargetFileName). Using the cmake only approach does not work.
- get_target_property(PLUGIN_PACKAGE_NAME ${target} SMTG_PLUGIN_PACKAGE_NAME)
- string(REPLACE "${PLUGIN_PACKAGE_NAME}" "$(TargetFileName)" absolute_output_file_path ${absolute_output_file_path})
- endif()
Here, it is assumed that MSVC compiler implies MS build tools, which is not a given.
Removing the string REPLACE command works for me.
Probably better to use CMAKE_MAKE_PROGRAM instead of MSVC here:
https://cmake.org/cmake/help/latest/variable/CMAKE_MAKE_PROGRAM.html
Comment out ll.459 of cmake/modules/SMTG_AddSMTGLibrary.cmake Then 3524 line of build.ninja is:
COMMAND = cmd.exe /C "cd /D D:\VST\VST_SDK\my_plugins\build\helloworld_with_VSTGUI && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_if_different D:/VST/VST_SDK/my_plugins/helloworld_with_VSTGUI/resource/plug.uidesc D:/VST/VST_SDK/vst3sdk/out/build/x64-Debug/VST3/Debug/helloworldWithVSTGUI.vst3/Contents/Resources/plug.uidesc && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E echo "[SMTG] Copied D:/VST/VST_SDK/my_plugins/helloworld_with_VSTGUI/resource/plug.uidesc to D:/VST/VST_SDK/vst3sdk/out/build/x64-Debug/VST3/Debug/helloworldWithVSTGUI.vst3/Contents/Resources/plug.uidesc""
It works. Thank you so much. This part is new for SDK 3.7.7 and I don't understand the background of this update, so I'm not sure this is the final solution :-)
Under VST SDK 3.7.7, CMake failed with the following error message.
3524 line of build.ninja is:
COMMAND = cmd.exe /C "cd /D D:\VST\VST_SDK\my_plugins\build\helloworld_with_VSTGUI && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_if_different D:/VST/VST_SDK/my_plugins/helloworld_with_VSTGUI/resource/plug.uidesc D:/VST/VST_SDK/vst3sdk/out/build/x64-Debug/VST3/Debug/$(TargetFileName)/Contents/Resources/plug.uidesc && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E echo "[SMTG] Copied D:/VST/VST_SDK/my_plugins/helloworld_with_VSTGUI/resource/plug.uidesc to D:/VST/VST_SDK/vst3sdk/out/build/x64-Debug/VST3/Debug/$(TargetFileName)/Contents/Resources/plug.uidesc""
The full CMake log is attached.