diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-09-02 09:50:19 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-11 21:01:27 +0200 |
commit | e1e2b2d8ca89bbd90afe3e884e95bc7372bd22d5 (patch) | |
tree | 802beb590b4d373d9799e4f9f66f2789e5a2807f /mkspecs/features/qml_plugin.prf | |
parent | 7a47aebe9ed41d6cd9c9bcd45758d4d553668e99 (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>
Diffstat (limited to 'mkspecs/features/qml_plugin.prf')
-rw-r--r-- | mkspecs/features/qml_plugin.prf | 5 |
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 |