The NAMES keyword was missing, causing the wrong qmake executable to be preferred (Qt5 should have priority).
If one of the Qt cache variables is missing, FindQt will reconfigure the build settings (e.g., changing between Qt4 and Qt5 and manually deleting QT_MODULE from CMakeCache.txt).
Fixed|CMake|Qt: Finding qmake, handling reconfiguration
The NAMES keyword was missing, causing the wrong qmake executable to be
preferred (Qt5 should have priority).
If one of the Qt cache variables is missing, FindQt will reconfigure the
build settings (e.g., changing between Qt4 and Qt5 and manually deleting
QT_MODULE from CMakeCache.txt).