Commit f10af219 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Tobias Hunger

CMake: Fix auto-detection on Windows

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

Change-Id: I3912badc0907c91044e76b3155e924dd985819f1
Reviewed-by: Tobias Hunger's avatarTobias Hunger <>
parent ad560bf0
......@@ -154,8 +154,14 @@ static QList<CMakeTool *> autoDetectCMakeTools()
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()) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment