summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-09-24 14:30:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-11 07:41:50 +0100
commit4712b0e99fdb90b6cbfe12ad16e534b49cd98343 (patch)
treeaed31b896e4f6ea6c1f0a0dea5a9af8da4d91f14 /tools/configure/configureapp.cpp
parent2d07d3b4e3036179667a822aa40285d071b76b9e (diff)
Add -archdatadir and change some of the default install dirs in Qt 5.
Architecture-depedent Qt data defaults now to something under -archdatadir. Architecture-dependent data is everything that contains machine code (e.g., plugins) as well as anything that hardcodes build-specific data, like qconfig.pri and qmodule.pri. That is: QML imports: $archdatadir/imports (includes plugins) Qt plugins: $archdatadir/plugins (machine code) Mkspecs: $archdatadir/mkspecs (build-specific) Architecture-independent Qt data defaults now to something under -datadir. This option existed in Qt 4, but did not differentiate between arch-dependent and independent. Following Autoconf's lead, --datadir is the *independent* data root. translations: $datadir/translations (.qm files are arch-independent) docs: $datadir/doc By default, both new options are equal to the Qt install prefix. (Strictly speaking, for complete Autoconf compatibility, we'd need a --datarootdir=$prefix/share, --datadir=$datarootdir/qt5 and --docdir=$datarootdir/doc/qt5, but that's just nitpicking and unnecessary) Change-Id: I39c886a6a2d2d2c0b11923c50974179e21f2af76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp34
1 files changed, 23 insertions, 11 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index cb853b3496..dfc3d216c3 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1066,6 +1066,13 @@ void Configure::parseCmdLine()
break;
dictionary[ "QT_INSTALL_IMPORTS" ] = configCmdLine.at(i);
}
+ else if (configCmdLine.at(i) == "-archdatadir") {
+ ++i;
+ if (i == argCount)
+ break;
+ dictionary[ "QT_INSTALL_ARCHDATA" ] = configCmdLine.at(i);
+ }
+
else if (configCmdLine.at(i) == "-datadir") {
++i;
if (i == argCount)
@@ -1577,12 +1584,13 @@ bool Configure::displayHelp()
desc( "-bindir <dir>", "Executables will be installed to <dir>\n(default PREFIX/bin)");
desc( "-libdir <dir>", "Libraries will be installed to <dir>\n(default PREFIX/lib)");
- desc( "-docdir <dir>", "Documentation will be installed to <dir>\n(default PREFIX/doc)");
desc( "-headerdir <dir>", "Headers will be installed to <dir>\n(default PREFIX/include)");
- desc( "-plugindir <dir>", "Plugins will be installed to <dir>\n(default PREFIX/plugins)");
- desc( "-importdir <dir>", "Imports for QML will be installed to <dir>\n(default PREFIX/imports)");
+ 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( "-datadir <dir>", "Data used by Qt programs will be installed to <dir>\n(default PREFIX)");
- desc( "-translationdir <dir>", "Translations of Qt programs will be installed to <dir>\n(default PREFIX/translations)");
+ 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)");
desc( "-examplesdir <dir>", "Examples will be installed to <dir>\n(default PREFIX/examples)");
desc( "-testsdir <dir>", "Tests will be installed to <dir>\n(default PREFIX/tests)\n");
@@ -3387,11 +3395,12 @@ void Configure::displayConfig()
sout << "Install prefix.............." << QDir::toNativeSeparators(dictionary["QT_INSTALL_PREFIX"]) << endl;
sout << "Headers installed to........" << QDir::toNativeSeparators(dictionary["QT_INSTALL_HEADERS"]) << endl;
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 << "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;
- sout << "Data installed to..........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_DATA"]) << endl;
sout << "Translations installed to..." << QDir::toNativeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << endl;
sout << "Examples installed to......." << QDir::toNativeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << endl;
sout << "Tests installed to.........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_TESTS"]) << endl;
@@ -3512,22 +3521,24 @@ void Configure::generateQConfigCpp()
if (dictionary["QT_INSTALL_PREFIX"].isEmpty())
qipempty = true;
- if (!dictionary["QT_INSTALL_DOCS"].size())
- dictionary["QT_INSTALL_DOCS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/doc";
if (!dictionary["QT_INSTALL_HEADERS"].size())
dictionary["QT_INSTALL_HEADERS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/include";
if (!dictionary["QT_INSTALL_LIBS"].size())
dictionary["QT_INSTALL_LIBS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/lib";
+ if (!dictionary["QT_INSTALL_ARCHDATA"].size())
+ dictionary["QT_INSTALL_ARCHDATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"];
if (!dictionary["QT_INSTALL_BINS"].size())
dictionary["QT_INSTALL_BINS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/bin";
if (!dictionary["QT_INSTALL_PLUGINS"].size())
- dictionary["QT_INSTALL_PLUGINS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/plugins";
+ dictionary["QT_INSTALL_PLUGINS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/plugins";
if (!dictionary["QT_INSTALL_IMPORTS"].size())
- dictionary["QT_INSTALL_IMPORTS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/imports";
+ dictionary["QT_INSTALL_IMPORTS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/imports";
if (!dictionary["QT_INSTALL_DATA"].size())
dictionary["QT_INSTALL_DATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"];
+ if (!dictionary["QT_INSTALL_DOCS"].size())
+ dictionary["QT_INSTALL_DOCS"] = qipempty ? "" : dictionary["QT_INSTALL_DATA"] + "/doc";
if (!dictionary["QT_INSTALL_TRANSLATIONS"].size())
- dictionary["QT_INSTALL_TRANSLATIONS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/translations";
+ dictionary["QT_INSTALL_TRANSLATIONS"] = qipempty ? "" : dictionary["QT_INSTALL_DATA"] + "/translations";
if (!dictionary["QT_INSTALL_EXAMPLES"].size())
dictionary["QT_INSTALL_EXAMPLES"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/examples";
if (!dictionary["QT_INSTALL_TESTS"].size())
@@ -3541,7 +3552,7 @@ void Configure::generateQConfigCpp()
if (dictionary["QT_HOST_BINS"].isEmpty())
dictionary["QT_HOST_BINS"] = haveHpx ? dictionary["QT_HOST_PREFIX"] + "/bin" : dictionary["QT_INSTALL_BINS"];
if (dictionary["QT_HOST_DATA"].isEmpty())
- dictionary["QT_HOST_DATA"] = haveHpx ? dictionary["QT_HOST_PREFIX"] : dictionary["QT_INSTALL_DATA"];
+ dictionary["QT_HOST_DATA"] = haveHpx ? dictionary["QT_HOST_PREFIX"] : dictionary["QT_INSTALL_ARCHDATA"];
// Generate the new qconfig.cpp file
QDir(buildPath).mkpath("src/corelib/global");
@@ -3569,6 +3580,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_adatpath=" << formatPath(dictionary["QT_INSTALL_ARCHDATA"]) << "\"," << endl
<< " \"qt_datapath=" << formatPath(dictionary["QT_INSTALL_DATA"]) << "\"," << endl
<< " \"qt_trnspath=" << formatPath(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\"," << endl
<< " \"qt_xmplpath=" << formatPath(dictionary["QT_INSTALL_EXAMPLES"]) << "\"," << endl