From df3631045c35aaed0b9de4ae5e643c8019972d13 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 15 Oct 2012 13:23:13 -0700 Subject: 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 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tools/configure/configureapp.cpp') 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 ", "Architecture-dependent data used by Qt will be installed to \n(default PREFIX)"); desc( "-plugindir ", "Plugins will be installed to \n(default ARCHDATADIR/plugins)"); desc( "-importdir ", "Imports for QML1 will be installed to \n(default ARCHDATADIR/imports)"); + desc( "-qmldir ", "Imports for QML2 will be installed to \n(default ARCHDATADIR/qml)"); desc( "-datadir ", "Data used by Qt programs will be installed to \n(default PREFIX)"); desc( "-docdir ", "Documentation will be installed to \n(default DATADIR/doc)"); desc( "-translationdir ", "Translations of Qt programs will be installed to \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 -- cgit v1.2.3