The relevant part is this:
DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe
And
DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/g++.exe
You need to confirm and correct these paths.