forked from qt-creator/qt-creator
CMake: Improve cmake setup on Apple
Users tend to select cmake.app, which is actually a GUI for cmake and not what Creator expects. So check for the proper binary in the bundle and return that if it exists. Change-Id: I1668baa6236ee4ae88da200cef257b636f7a9e72 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -139,6 +139,12 @@ QVariantMap CMakeTool::toMap() const
|
||||
|
||||
Utils::FileName CMakeTool::cmakeExecutable() const
|
||||
{
|
||||
if (Utils::HostOsInfo::isMacHost() && m_executable.endsWith(".app")) {
|
||||
Utils::FileName toTest = m_executable;
|
||||
toTest = toTest.appendPath("Contents/bin/cmake");
|
||||
if (toTest.exists())
|
||||
return toTest;
|
||||
}
|
||||
return m_executable;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user