forked from qt-creator/qt-creator
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:
@@ -153,6 +153,17 @@ static QList<CMakeTool *> autoDetectCMakeTools()
|
|||||||
QStringList path = env.path();
|
QStringList path = env.path();
|
||||||
path.removeDuplicates();
|
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"));
|
QStringList execs = env.appendExeExtensions(QLatin1String("cmake"));
|
||||||
|
|
||||||
foreach (QString base, path) {
|
foreach (QString base, path) {
|
||||||
|
|||||||
Reference in New Issue
Block a user