QT_RAW_INSTALL_FOO => QT_INSTALL_FOO/raw
this makes the "sysrootable" properties more magic, with the raw versions being omitted from the qmake -query output and automatically falling back to the "cooked" variant if there is no sysroot set. this makes the "normal" qmake -query less noisy. this will become even more obvious when i add more "overloads" of the properties. Change-Id: I08000986427264ec6238c8fe0a77f5cecdbf1201 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
parent
197ba93cf0
commit
aed6eaa5b2
2
dist/changes-5.0.0
vendored
2
dist/changes-5.0.0
vendored
@ -207,7 +207,7 @@ information about a particular change.
|
||||
an entirely pristine context.
|
||||
* Configure's -sysroot and -hostprefix are now handled slightly differently.
|
||||
The QT_INSTALL_... properties are now automatically prefixed with the sysroot;
|
||||
the raw values are available as QT_RAW_INSTALL_... and the sysroot as QT_SYSROOT.
|
||||
the raw values are available as QT_INSTALL_.../raw and the sysroot as QT_SYSROOT.
|
||||
The new QT_HOST_... properties can be used to refer to the Qt host tools.
|
||||
* Several functions and built-in variables were modified to return normalized paths.
|
||||
|
||||
|
@ -118,24 +118,24 @@ load(qt_installs)
|
||||
|
||||
unix|win32-g++* {
|
||||
CONFIG += create_pc
|
||||
QMAKE_PKGCONFIG_LIBDIR = $$[QT_RAW_INSTALL_LIBS]
|
||||
QMAKE_PKGCONFIG_INCDIR = $$[QT_RAW_INSTALL_HEADERS]/$$TARGET
|
||||
QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_RAW_INSTALL_HEADERS]
|
||||
QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw]
|
||||
QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]/$$TARGET
|
||||
QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS/raw]
|
||||
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
||||
include_replace.match = $$QMAKE_INCDIR_QT
|
||||
include_replace.replace = $$[QT_RAW_INSTALL_HEADERS]
|
||||
include_replace.replace = $$[QT_INSTALL_HEADERS/raw]
|
||||
lib_replace.match = $$QMAKE_LIBDIR_QT
|
||||
lib_replace.replace = $$[QT_RAW_INSTALL_LIBS]
|
||||
lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
|
||||
prefix_replace.match = $$QT_BUILD_TREE
|
||||
prefix_replace.replace = $$[QT_RAW_INSTALL_PREFIX]
|
||||
prefix_replace.replace = $$[QT_INSTALL_PREFIX/raw]
|
||||
QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace
|
||||
}
|
||||
|
||||
unix {
|
||||
CONFIG += create_libtool explicitlib
|
||||
QMAKE_PRL_LIBDIR = $$[QT_RAW_INSTALL_LIBS] ### XXX
|
||||
QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS/raw] ### XXX
|
||||
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
|
||||
QMAKE_LIBTOOL_LIBDIR = $$[QT_RAW_INSTALL_LIBS]
|
||||
QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw]
|
||||
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
|
||||
}
|
||||
|
||||
|
@ -2782,7 +2782,7 @@ QMakeProject::doVariableReplaceExpand(const QString &str, QHash<QString, QString
|
||||
unicode != DOT && unicode != UNDERSCORE &&
|
||||
//unicode != SINGLEQUOTE && unicode != DOUBLEQUOTE &&
|
||||
(unicode < 'a' || unicode > 'z') && (unicode < 'A' || unicode > 'Z') &&
|
||||
(unicode < '0' || unicode > '9'))
|
||||
(unicode < '0' || unicode > '9') && (!term || unicode != '/'))
|
||||
break;
|
||||
var.append(QChar(unicode));
|
||||
if(++i == str_len)
|
||||
|
@ -68,18 +68,6 @@ static const struct {
|
||||
{ "QT_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, false },
|
||||
{ "QT_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, false },
|
||||
{ "QT_INSTALL_DEMOS", QLibraryInfo::ExamplesPath, false }, // Just backwards compat
|
||||
{ "QT_RAW_INSTALL_PREFIX", QLibraryInfo::PrefixPath, true },
|
||||
{ "QT_RAW_INSTALL_DATA", QLibraryInfo::DataPath, true },
|
||||
{ "QT_RAW_INSTALL_DOCS", QLibraryInfo::DocumentationPath, true },
|
||||
{ "QT_RAW_INSTALL_HEADERS", QLibraryInfo::HeadersPath, true },
|
||||
{ "QT_RAW_INSTALL_LIBS", QLibraryInfo::LibrariesPath, true },
|
||||
{ "QT_RAW_INSTALL_BINS", QLibraryInfo::BinariesPath, true },
|
||||
{ "QT_RAW_INSTALL_TESTS", QLibraryInfo::TestsPath, true },
|
||||
{ "QT_RAW_INSTALL_PLUGINS", QLibraryInfo::PluginsPath, true },
|
||||
{ "QT_RAW_INSTALL_IMPORTS", QLibraryInfo::ImportsPath, true },
|
||||
{ "QT_RAW_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath, true },
|
||||
{ "QT_RAW_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, true },
|
||||
{ "QT_RAW_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, true },
|
||||
{ "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true },
|
||||
{ "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
|
||||
{ "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
|
||||
@ -87,10 +75,15 @@ static const struct {
|
||||
|
||||
QMakeProperty::QMakeProperty() : settings(0)
|
||||
{
|
||||
for (int i = 0; i < sizeof(propList)/sizeof(propList[0]); i++)
|
||||
m_values[QString::fromLatin1(propList[i].name)] = propList[i].raw
|
||||
? QLibraryInfo::rawLocation(propList[i].loc)
|
||||
: QLibraryInfo::location(propList[i].loc);
|
||||
for (int i = 0; i < sizeof(propList)/sizeof(propList[0]); i++) {
|
||||
QString name = QString::fromLatin1(propList[i].name);
|
||||
QString val = QLibraryInfo::rawLocation(propList[i].loc);
|
||||
if (!propList[i].raw) {
|
||||
m_values[name] = QLibraryInfo::location(propList[i].loc);
|
||||
name += "/raw";
|
||||
}
|
||||
m_values[name] = val;
|
||||
}
|
||||
}
|
||||
|
||||
QMakeProperty::~QMakeProperty()
|
||||
@ -216,8 +209,13 @@ QMakeProperty::exec()
|
||||
#ifdef QT_VERSION_STR
|
||||
specialProps.append("QT_VERSION");
|
||||
#endif
|
||||
foreach (QString prop, specialProps)
|
||||
fprintf(stdout, "%s:%s\n", prop.toLatin1().constData(), value(prop).toLatin1().constData());
|
||||
foreach (QString prop, specialProps) {
|
||||
QString val = value(prop);
|
||||
QString pval = value(prop + "/raw");
|
||||
fprintf(stdout, "%s:%s\n", prop.toLatin1().constData(), val.toLatin1().constData());
|
||||
if (!pval.isEmpty() && pval != val)
|
||||
fprintf(stdout, "%s/raw:%s\n", prop.toLatin1().constData(), pval.toLatin1().constData());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
for(QStringList::ConstIterator it = Option::prop::properties.begin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user