Auto-detect CMake in standard paths on Windows and macOS

Change-Id: I8ae765eaed5bc234347e01fe81c208b77c1c32ec
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jake Petroules
2017-06-09 20:47:47 -07:00
parent 7ff48935e8
commit e3285ce85d

View File

@@ -153,6 +153,17 @@ static QList<CMakeTool *> autoDetectCMakeTools()
QStringList path = env.path();
path.removeDuplicates();
if (HostOsInfo::isWindowsHost()) {
path.append("C:/Program Files/CMake");
path.append("C:/Program Files (x86)/CMake");
}
if (HostOsInfo::isMacHost()) {
path.append("/Applications/CMake.app/Contents/bin");
path.append("/usr/local/bin");
path.append("/opt/local/bin");
}
QStringList execs = env.appendExeExtensions(QLatin1String("cmake"));
foreach (QString base, path) {