CMake: Fix auto-detection on Windows

Recent CMake installer (3.9) installs the executable in CMake/bin.

Change-Id: I3912badc0907c91044e76b3155e924dd985819f1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-09-14 09:46:07 +03:00
committed by Tobias Hunger
parent ad560bf019
commit f10af21922

View File

@@ -154,8 +154,14 @@ static QList<CMakeTool *> autoDetectCMakeTools()
path.removeDuplicates();
if (HostOsInfo::isWindowsHost()) {
path.append("C:/Program Files/CMake");
path.append("C:/Program Files (x86)/CMake");
const QString progFiles = QLatin1String(qgetenv("ProgramFiles"));
path.append(progFiles + "/CMake");
path.append(progFiles + "/CMake/bin");
const QString progFilesX86 = QLatin1String(qgetenv("ProgramFiles(x86)"));
if (!progFilesX86.isEmpty()) {
path.append(progFilesX86 + "/CMake");
path.append(progFilesX86 + "/CMake/bin");
}
}
if (HostOsInfo::isMacHost()) {