CMake: Do not run GUI CMake tool on macOS

We may neither run "/some/path/CMake.app" nor
"/some/path/CMake.app/Contents/MacOS/CMake",
so add a missing workaround for the latter, and use the "resolved"
executable path for the retrieval of version info and capabilities.

Change-Id: I6fed8cc478c0d0b9946a934fd83126e157bde992
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Eike Ziller
2019-08-12 15:24:15 +02:00
parent 42ea10892c
commit dbfa55f5fc
3 changed files with 23 additions and 7 deletions

View File

@@ -126,7 +126,7 @@ public:
void updateErrorFlags()
{
const QFileInfo fi = m_executable.toFileInfo();
const QFileInfo fi = CMakeTool::cmakeExecutable(m_executable).toFileInfo();
m_pathExists = fi.exists();
m_pathIsFile = fi.isFile();
m_pathIsExecutable = fi.isExecutable();