How to build and run tests (mtest) in Visual Studio?
I've followed the very thorough instructions at https://musescore.org/en/handbook/developers-handbook/compilation/compi… and I can successfully build and run the mscore project.
However, I'm not able to build the tests (mtest folder). When I open the folder I get
CMake Error at C:...MuseScore\mtest\CMakeLists.txt:30 (QT5_ADD_RESOURCES):
Unknown CMake command "QT5_ADD_RESOURCES"
even though I do have the Qt install in my path as instructed: C:\Qt\5.9.7\msvc2017_64\bin
I have experimented with adding other Qt folders to the PATH, and other environment variables related to CMake, such as CMAKE_PREFIX_PATH, and also tried running CMake on the command line in Developer Command Prompt, but haven't found the magic combination.
It would be great if someone who has mtest working successfully in Visual Studio could append the instructions to https://musescore.org/en/handbook/developers-handbook/compilation/compi…
The mtest README.md at https://github.com/musescore/MuseScore/tree/master/mtest is very old and only refers to mingw32, so perhaps that should be updated as well.
Visual Studio Community Edition 2017 (15.9.6)
Qt Visual Studio Tools 2.3.1
Qt 5.9.7 installed to default location C:\Qt\5.9.7 (msvc2017_64 only, not mingw32)