CMake: Drop two use of HostOsInfo::isXXXHost

More friendly to docker.

Change-Id: I3eeb859cc880fa24c2b1c74caf5a06ec4f27cb2f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2022-03-10 13:05:03 +01:00
parent 9ec7e2bbb0
commit 95510a842e

View File

@@ -234,7 +234,7 @@ FilePath CMakeTool::qchFilePath() const
FilePath CMakeTool::cmakeExecutable(const FilePath &path) FilePath CMakeTool::cmakeExecutable(const FilePath &path)
{ {
if (HostOsInfo::isMacHost()) { if (path.osType() == OsTypeMac) {
const QString executableString = path.toString(); const QString executableString = path.toString();
const int appIndex = executableString.lastIndexOf(".app"); const int appIndex = executableString.lastIndexOf(".app");
const int appCutIndex = appIndex + 4; const int appCutIndex = appIndex + 4;
@@ -251,7 +251,7 @@ FilePath CMakeTool::cmakeExecutable(const FilePath &path)
const FilePath resolvedPath = path.canonicalPath(); const FilePath resolvedPath = path.canonicalPath();
// Evil hack to make snap-packages of CMake work. See QTCREATORBUG-23376 // Evil hack to make snap-packages of CMake work. See QTCREATORBUG-23376
if (HostOsInfo::isLinuxHost() && resolvedPath.fileName() == "snap") if (path.osType() == OsTypeLinux && resolvedPath.fileName() == "snap")
return path; return path;
return resolvedPath; return resolvedPath;