diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index 4efc3515295..52f6f678932 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -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