Commit 41327df2 authored by Fawzi Mohamed's avatar Fawzi Mohamed

ios: override spec for ios

On ios qmake is called recursively and the second call with a different
spec (macx-xcode instead of macx-ios-clang) which contains the
correct build settings (includes, compiler flags) as ios builds with
xcode.
macx-ios-clang just creates supporting makefiles, and to avoid being
slow does not evaluate everything, and contains misleading information
(that is never used), whereas macx-xcode correctly evaluates the
the variables and generates the xcodeproject that is actually used to
build the application.

It is important to override only for the creator evaluator, and not
the qmake buildstep used to build the app (as we use the makefiles).

Task-number: QTCREATORBUG-11908
Change-Id: I06d569de16f934fca5e104a8da727a3557a4c2e3
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent 1ca022e3
......@@ -989,6 +989,20 @@ QtSupport::ProFileReader *QmakeProject::createProFileReader(const QmakeProFileNo
m_qmakeGlobals->setCommandLineArguments(m_rootProjectNode->buildDir(), qmakeArgs);
QtSupport::ProFileCacheManager::instance()->incRefCount();
// On ios, qmake is called recursively, and the second call with a different
// spec.
// macx-ios-clang just creates supporting makefiles, and to avoid being
// slow does not evaluate everything, and contains misleading information
// (that is never used).
// macx-xcode correctly evaluates the variables and generates the xcodeproject
// that is actually used to build the application.
//
// It is important to override the spec file only for the creator evaluator,
// and not the qmake buildstep used to build the app (as we use the makefiles).
const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios"; // from Ios::Constants
if (qtVersion->type() == QLatin1String(IOSQT))
m_qmakeGlobals->xqmakespec = QLatin1String("macx-xcode");
}
++m_qmakeGlobalsRefCnt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment