forked from qt-creator/qt-creator
CMake: Fix snap-ed CMake installations on ubuntu
Snap packages apparently work by sym-linking the cmake binary to snap. So keep the sym-link if it points to a file called "snap" on Linux. Task-number: QTCREATORBUG-23376 Change-Id: I065457c26b32a191760e8dda1ef1bdc7a79712ad Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -268,7 +269,13 @@ Utils::FilePath CMakeTool::cmakeExecutable(const Utils::FilePath &path)
|
||||
return toTest.canonicalPath();
|
||||
}
|
||||
}
|
||||
return path.canonicalPath();
|
||||
|
||||
const Utils::FilePath resolvedPath = path.canonicalPath();
|
||||
// Evil hack to make snap-packages of CMake work. See QTCREATORBUG-23376
|
||||
if (Utils::HostOsInfo::isLinuxHost() && resolvedPath.fileName() == "snap")
|
||||
return path;
|
||||
|
||||
return resolvedPath;
|
||||
}
|
||||
|
||||
bool CMakeTool::isAutoRun() const
|
||||
|
Reference in New Issue
Block a user