Hello!
It's a long while when problem was been found, but it happens on Windows exclusively: when trying to build any CMake project that has any sub-directory or "ExternalProject" added. Here is a simple project (it builds for Linux with ncurses, for 3DS, for Wii, for Wii U, and for Switch): https://github.com/Wohlstand/MixerXDemoPlayer (when clonning repo, don't forget also submodules!).
That happens, because for unknown reasons, all paths in the submodule's make file (no matter Ninja or GNU Make / MinGW Makefile generator is chosen) contains a mixture of path as with Windows native and MSyS's specific (it starts with MSyS's path, and then a connotated Windows native path, of course this is fully invalid path). And in result, the build fails because resulted makefile is corrupted.
On UNIX-like systems the build goes just fine (tested on Linux mainly).