QT_INSTALL_BINS=
QT_INSTALL_PLUGINS=
QT_INSTALL_IMPORTS=
+QT_INSTALL_QML=
QT_INSTALL_ARCHDATA=
QT_INSTALL_DATA=
QT_INSTALL_TRANSLATIONS=
VAL=no
;;
#Qt style options that pass an argument
- -prefix|-docdir|-headerdir|-plugindir|-importdir|-archdatadir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
importdir)
QT_INSTALL_IMPORTS="$VAL"
;;
+ qmldir)
+ QT_INSTALL_QML="$VAL"
+ ;;
archdatadir)
QT_INSTALL_ARCHDATA="$VAL"
;;
fi
QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
+#qml
+if [ -z "$QT_INSTALL_QML" ]; then #default
+ QT_INSTALL_QML="$QT_INSTALL_ARCHDATA/qml" #fallback
+fi
+QT_INSTALL_QML=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_QML"`
+
if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
QT_INSTALL_TRANSLATIONS="$QT_INSTALL_DATA/translations" #fallback
fi
(default PREFIX)
-plugindir <dir> ...... Plugins will be installed to <dir>
(default ARCHDATADIR/plugins)
- -importdir <dir> ...... Imports for QML will be installed to <dir>
+ -importdir <dir> ...... Imports for QML1 will be installed to <dir>
(default ARCHDATADIR/imports)
+ -qmldir <dir> ......... Imports for QML2 will be installed to <dir>
+ (default ARCHDATADIR/qml)
-datadir <dir> ........ Arch-independent data used by Qt will be installed to <dir>
(default PREFIX)
-docdir <dir> ......... Documentation will be installed to <dir>
"qt_binspath=$QT_INSTALL_BINS",
"qt_plugpath=$QT_INSTALL_PLUGINS",
"qt_impspath=$QT_INSTALL_IMPORTS",
+ "qt_qml2path=$QT_INSTALL_QML",
"qt_adatpath=$QT_INSTALL_ARCHDATA",
"qt_datapath=$QT_INSTALL_DATA",
"qt_trnspath=$QT_INSTALL_TRANSLATIONS",
OTHER_FILES += $$fq_qml_files
qml1_target: \
- instbase = $$[QT_INSTALL_IMPORTS]/QtDeclarative
-else: \
instbase = $$[QT_INSTALL_IMPORTS]
+else: \
+ instbase = $$[QT_INSTALL_QML]
exists($$[QT_HOST_PREFIX]/.qmake.cache) {
# These bizarre rules copy the files to the qtbase build directory
TARGET = declarative_$${TARGET}
}
isEmpty(TARGETPATH): TARGETPATH = $$eval(QT.$${CXX_MODULE}.name)
-DESTDIR = $$eval(QT.$${CXX_MODULE}.imports)/$$TARGETPATH
QMLTYPEFILE = $$_PRO_FILE_PWD_/plugins.qmltypes
exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE
# Install rules
-qml1_target: \
- instbase = $$[QT_INSTALL_IMPORTS]/QtDeclarative
-else: \
+qml1_target {
+ DESTDIR = $$eval(QT.$${CXX_MODULE}.imports)/$$TARGETPATH
instbase = $$[QT_INSTALL_IMPORTS]
+} else {
+ DESTDIR = $$eval(QT.$${CXX_MODULE}.qml)/$$TARGETPATH
+ instbase = $$[QT_INSTALL_QML]
+}
target.path = $$instbase/$$TARGETPATH
INSTALLS += target
QT_MODULE_PLUGIN_BASE = $$[QT_INSTALL_PLUGINS]
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS]
+ QT_MODULE_QML_BASE = $$[QT_INSTALL_QML]
include($$mod)
}
}
unset(QT_MODULE_PLUGIN_BASE)
unset(QT_MODULE_BIN_BASE)
unset(QT_MODULE_IMPORT_BASE)
+ unset(QT_MODULE_QML_BASE)
}
load(qt_functions)
"QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \
"QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]" \
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
- "QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE$$MODULE_IMPORT_SUFFIX" \
+ "QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \
+ "QT.$${MODULE}.qml = \$\$QT_MODULE_QML_BASE" \
"QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
$$module_privdep \
$$module_build_type \
"QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \
"QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \
+ "QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \
"QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
"QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \
$$module_rpathlink \
include($$MODULE_FWD_PRI)
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
name depends private_depends module_config CONFIG DEFINES sources \
- includes private_includes bins libs plugins imports \
+ includes private_includes bins libs plugins imports qml \
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient)
cache(QT_CONFIG, transient)
{ "QT_INSTALL_TESTS", QLibraryInfo::TestsPath, false },
{ "QT_INSTALL_PLUGINS", QLibraryInfo::PluginsPath, false },
{ "QT_INSTALL_IMPORTS", QLibraryInfo::ImportsPath, false },
+ { "QT_INSTALL_QML", QLibraryInfo::Qml2ImportsPath, false },
{ "QT_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath, false },
{ "QT_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, false },
{ "QT_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, false },
#endif // QT_BOOTSTRAPPED
+/*
+ * To add a new entry in QLibrary::LibraryLocation, add it to the enum above the bootstrapped values and:
+ * - add its relative path in the qtConfEntries[] array below
+ * (the key is what appears in a qt.conf file)
+ * - add a property name in qmake/property.cpp propList[] array
+ * (it's used with qmake -query)
+ * - add to qt_config.prf, qt_module.prf, qt_module_fwdpri.prf
+ */
+
static const struct {
char key[14], value[13];
} qtConfEntries[] = {
{ "Binaries", "bin" },
{ "Plugins", "plugins" }, // should be ${ArchData}/plugins
{ "Imports", "imports" }, // should be ${ArchData}/imports
+ { "Qml2Imports", "qml" }, // should be ${ArchData}/qml
{ "ArchData", "." },
{ "Data", "." },
{ "Translations", "translations" }, // should be ${Data}/translations
\value LibrariesPath The location of installed libraries.
\value BinariesPath The location of installed Qt binaries (tools and applications).
\value PluginsPath The location of installed Qt plugins.
- \value ImportsPath The location of installed QML extensions to import.
+ \value ImportsPath The location of installed QML extensions to import (QML 1.x).
+ \value Qml2ImportsPath The location of installed QML extensions to import (QML 2.x).
\value ArchDataPath The location of general architecture-dependent Qt data.
\value DataPath The location of general architecture-independent Qt data.
\value TranslationsPath The location of translation information for Qt strings.
BinariesPath,
PluginsPath,
ImportsPath,
+ Qml2ImportsPath,
ArchDataPath,
DataPath,
TranslationsPath,
ExamplesPath,
TestsPath,
// Insert new values above this line
+ // Please read the comments in qlibraryinfo.cpp before adding
#ifdef QT_BOOTSTRAPPED
// These are not subject to binary compatibility constraints
SysrootPath,
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)
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)");
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;
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())
<< " \"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