summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-10-15 13:23:13 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-19 15:25:54 +0100
commitdf3631045c35aaed0b9de4ae5e643c8019972d13 (patch)
tree9e4c1bc3489d7e88ccc164f6d6c76142bcad483e /tools/configure/configureapp.cpp
parent36270e45058b84c2fc3cb9683278983eedea3a1b (diff)
Add a new location for QML 2.x imports
This commits adds a -qmldir configuration option for the configures to allow the user to change the default location (it defaults to $archdatadir/qml). It adds a QLibraryInfo::Qml2ImportsPath value for QLibraryInfo::location, a qmake property of QT_INSTALL_QML and a qt.conf configure location entry "Qml2Imports". At the same time, it makes the qmake .prf files dealing with QML plugins be the QML 2 version. Those files are new in Qt 5, so we have the option to choose which version we want to use. Discussed-on: http://lists.qt-project.org/pipermail/development/2012-October/007136.html Change-Id: I8c1c53e8685a5934ed0a9a42ba5663297b81a677 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 239060e4d2..a08989d157 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1067,6 +1067,14 @@ void Configure::parseCmdLine()
break;
dictionary[ "QT_INSTALL_IMPORTS" ] = configCmdLine.at(i);
}
+
+ else if (configCmdLine.at(i) == "-qmldir") {
+ ++i;
+ if (i == argCount)
+ break;
+ dictionary[ "QT_INSTALL_QML" ] = configCmdLine.at(i);
+ }
+
else if (configCmdLine.at(i) == "-archdatadir") {
++i;
if (i == argCount)
@@ -1595,6 +1603,7 @@ bool Configure::displayHelp()
desc( "-archdatadir <dir>", "Architecture-dependent data used by Qt will be installed to <dir>\n(default PREFIX)");
desc( "-plugindir <dir>", "Plugins will be installed to <dir>\n(default ARCHDATADIR/plugins)");
desc( "-importdir <dir>", "Imports for QML1 will be installed to <dir>\n(default ARCHDATADIR/imports)");
+ desc( "-qmldir <dir>", "Imports for QML2 will be installed to <dir>\n(default ARCHDATADIR/qml)");
desc( "-datadir <dir>", "Data used by Qt programs will be installed to <dir>\n(default PREFIX)");
desc( "-docdir <dir>", "Documentation will be installed to <dir>\n(default DATADIR/doc)");
desc( "-translationdir <dir>", "Translations of Qt programs will be installed to <dir>\n(default DATADIR/translations)");
@@ -3414,7 +3423,8 @@ void Configure::displayConfig()
sout << "Libraries installed to......" << QDir::toNativeSeparators(dictionary["QT_INSTALL_LIBS"]) << endl;
sout << "Arch-dep. data to..........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_ARCHDATA"]) << endl;
sout << "Plugins installed to........" << QDir::toNativeSeparators(dictionary["QT_INSTALL_PLUGINS"]) << endl;
- sout << "Imports installed to........" << QDir::toNativeSeparators(dictionary["QT_INSTALL_IMPORTS"]) << endl;
+ sout << "QML1 imports installed to..." << QDir::toNativeSeparators(dictionary["QT_INSTALL_IMPORTS"]) << endl;
+ sout << "QML2 imports installed to..." << QDir::toNativeSeparators(dictionary["QT_INSTALL_QML"]) << endl;
sout << "Binaries installed to......." << QDir::toNativeSeparators(dictionary["QT_INSTALL_BINS"]) << endl;
sout << "Arch-indep. data to........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_DATA"]) << endl;
sout << "Docs installed to..........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_DOCS"]) << endl;
@@ -3550,6 +3560,8 @@ void Configure::generateQConfigCpp()
dictionary["QT_INSTALL_PLUGINS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/plugins";
if (!dictionary["QT_INSTALL_IMPORTS"].size())
dictionary["QT_INSTALL_IMPORTS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/imports";
+ if (!dictionary["QT_INSTALL_QML"].size())
+ dictionary["QT_INSTALL_QML"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/qml";
if (!dictionary["QT_INSTALL_DATA"].size())
dictionary["QT_INSTALL_DATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"];
if (!dictionary["QT_INSTALL_DOCS"].size())
@@ -3597,6 +3609,7 @@ void Configure::generateQConfigCpp()
<< " \"qt_binspath=" << formatPath(dictionary["QT_INSTALL_BINS"]) << "\"," << endl
<< " \"qt_plugpath=" << formatPath(dictionary["QT_INSTALL_PLUGINS"]) << "\"," << endl
<< " \"qt_impspath=" << formatPath(dictionary["QT_INSTALL_IMPORTS"]) << "\"," << endl
+ << " \"qt_qml2path=" << formatPath(dictionary["QT_INSTALL_QML"]) << "\"," << endl
<< " \"qt_adatpath=" << formatPath(dictionary["QT_INSTALL_ARCHDATA"]) << "\"," << endl
<< " \"qt_datapath=" << formatPath(dictionary["QT_INSTALL_DATA"]) << "\"," << endl
<< " \"qt_trnspath=" << formatPath(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\"," << endl