summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qml_plugin.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/qml_plugin.prf')
-rw-r--r--mkspecs/features/qml_plugin.prf16
1 files changed, 10 insertions, 6 deletions
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index f1c5658b04..74ab932f80 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -68,7 +68,10 @@ load(qt_common)
# To regenerate run 'make qmltypes' which will update the plugins.qmltypes file in the source
# directory. Then review and commit the changes made to plugins.qmltypes.
#
-!cross_compile {
+# Due to the above mentioned drawbacks, there is a better mechanism available now: qmltyperegistrar
+# can generate the .qmltypes files at compile time. It will do this when CONFIG += qmltypes is set.
+# Therefore, don't try to generate the qmltypes files via qmlplugindump in that case.
+!cross_compile:!qmltypes {
qmlplugindump = qmlplugindump
importpath.name = QML2_IMPORT_PATH
importpath.value =
@@ -84,12 +87,13 @@ load(qt_common)
# against concurrent wrapper creation by omitting it during build passes.
# However, creating the actual targets is reserved to the build passes.
build_pass|!debug_and_release {
- isEmpty(IMPORT_VERSION) {
+ isEmpty(QML_IMPORT_VERSION):!isEmpty(IMPORT_VERSION): QML_IMPORT_VERSION = $$IMPORT_VERSION
+ isEmpty(QML_IMPORT_VERSION) {
no_cxx_module {
- IMPORT_VERSION = $$section(MODULE_VERSION, ., 0, 1)
- isEmpty(IMPORT_VERSION): error("Must set IMPORT_VERSION")
+ QML_IMPORT_VERSION = $$section(MODULE_VERSION, ., 0, 1)
+ isEmpty(QML_IMPORT_VERSION): error("Must set QML_IMPORT_VERSION")
} else {
- IMPORT_VERSION = $$section(QT.$${CXX_MODULE}.VERSION, ., 0, 1)
+ QML_IMPORT_VERSION = $$section(QT.$${CXX_MODULE}.VERSION, ., 0, 1)
}
}
@@ -104,7 +108,7 @@ load(qt_common)
}
qmltypes.target = qmltypes
- qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(IMPORT_NAME, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
+ qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(IMPORT_NAME, /, .) $$QML_IMPORT_VERSION > $$QMLTYPEFILE
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
} else {
qmltypes.CONFIG += recursive