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>
This commit is contained in:
parent
7a47aebe9e
commit
e1e2b2d8ca
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user