Commit 174874f5 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

introduce /src qmake property variants

this is for shadow builds during build time, where the respective files
are expected in the source dir.

Change-Id: I18dcfbdef99e1562a51dacac333642cae8105ebd
(cherry picked from qtbase/4531c83376c1a3546305a9fa5203e0a885e8860d)
Reviewed-by: default avatarMitch Curtis <mitch.curtis@digia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 890c10b6
...@@ -311,33 +311,46 @@ bool QMakeGlobals::initProperties() ...@@ -311,33 +311,46 @@ bool QMakeGlobals::initProperties()
QT_PCLOSE(proc); QT_PCLOSE(proc);
} }
#endif #endif
foreach (QByteArray line, data.split('\n')) foreach (QByteArray line, data.split('\n')) {
{ int off = line.indexOf(':');
int off = line.indexOf(':'); if (off < 0) // huh?
if (off < 0) // huh? continue;
continue; if (line.endsWith('\r'))
if (line.endsWith('\r')) line.chop(1);
line.chop(1); QString name = QString::fromLatin1(line.left(off));
QString name = QString::fromLatin1(line.left(off)); ProString value = ProString(QDir::fromNativeSeparators(
ProString value = ProString(QDir::fromNativeSeparators( QString::fromLocal8Bit(line.mid(off + 1))));
QString::fromLocal8Bit(line.mid(off + 1)))); properties.insert(ProKey(name), value);
properties.insert(ProKey(name), value); if (name.startsWith(QLatin1String("QT_"))) {
if (name.startsWith(QLatin1String("QT_")) && !name.contains(QLatin1Char('/'))) { bool plain = !name.contains(QLatin1Char('/'));
if (name.startsWith(QLatin1String("QT_INSTALL_"))) { if (!plain) {
if (!name.endsWith(QLatin1String("/get")))
continue;
name.chop(4);
}
if (name.startsWith(QLatin1String("QT_INSTALL_"))) {
if (plain) {
properties.insert(ProKey(name + QLatin1String("/raw")), value); properties.insert(ProKey(name + QLatin1String("/raw")), value);
properties.insert(ProKey(name + QLatin1String("/get")), value); properties.insert(ProKey(name + QLatin1String("/get")), value);
if (name == QLatin1String("QT_INSTALL_PREFIX") }
|| name == QLatin1String("QT_INSTALL_DATA") properties.insert(ProKey(name + QLatin1String("/src")), value);
|| name == QLatin1String("QT_INSTALL_BINS")) { if (name == QLatin1String("QT_INSTALL_PREFIX")
name.replace(3, 7, QLatin1String("HOST")); || name == QLatin1String("QT_INSTALL_DATA")
|| name == QLatin1String("QT_INSTALL_BINS")) {
name.replace(3, 7, QLatin1String("HOST"));
if (plain) {
properties.insert(ProKey(name), value); properties.insert(ProKey(name), value);
properties.insert(ProKey(name + QLatin1String("/get")), value); properties.insert(ProKey(name + QLatin1String("/get")), value);
} }
} else if (name.startsWith(QLatin1String("QT_HOST_"))) { properties.insert(ProKey(name + QLatin1String("/src")), value);
properties.insert(ProKey(name + QLatin1String("/get")), value);
} }
} else if (name.startsWith(QLatin1String("QT_HOST_"))) {
if (plain)
properties.insert(ProKey(name + QLatin1String("/get")), value);
properties.insert(ProKey(name + QLatin1String("/src")), value);
} }
} }
}
return true; return true;
} }
#else #else
......
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