summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-09-02 09:50:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 21:01:27 +0200
commite1e2b2d8ca89bbd90afe3e884e95bc7372bd22d5 (patch)
tree802beb590b4d373d9799e4f9f66f2789e5a2807f
parent7a47aebe9ed41d6cd9c9bcd45758d4d553668e99 (diff)
qml_plugin.prf: moc plugin with -Muri=$$TARGETPATH
When we build qml plugins, we now depend on embedding the uri of the plugin into its meta-data using the new -M switch to moc for static builds. This patch will let this happen automatically whenever you call load(qml_plugin) from your pro file. With this patch, you only need to rebuild your plugin to support static applications. Task-number: QTBUG-28357 Change-Id: I99e2fc80688fa43cf734551553f4fa0cb5ed47ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--mkspecs/features/qml_plugin.prf5
1 files changed, 5 insertions, 0 deletions
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index 28fbb392a7..af941058db 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -25,6 +25,11 @@ if(win32|mac):!macx-xcode {
}
isEmpty(TARGETPATH): TARGETPATH = $$eval(QT.$${CXX_MODULE}.name)
+# Insert the plugins URI into its meta data to enable usage
+# of static plugins in QtDeclarative:
+URI = $$replace(TARGETPATH, "/", ".")
+QMAKE_MOC_OPTIONS += -Muri=$$URI
+
QMLTYPEFILE = $$_PRO_FILE_PWD_/plugins.qmltypes
exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE