diff options
Diffstat (limited to 'mkspecs/features/qml_plugin.prf')
-rw-r--r-- | mkspecs/features/qml_plugin.prf | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index ad8ecdf5f1..74ab932f80 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -55,7 +55,7 @@ INSTALLS += target # Some final setup -TARGET = $$qt5LibraryTarget($$TARGET) +TARGET = $$qt5LibraryTarget($$TARGET, "qml/$$TARGETPATH/") load(qt_targets) load(qt_common) @@ -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,17 +87,18 @@ 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) } } load(resolve_target) - TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, ) + isEmpty(IMPORT_NAME): IMPORT_NAME = $$replace(TARGETPATH, \\.\\d+\$, ) !qml1_target { isEmpty(QMAKE_PLUGINDUMP_DEPENDENCIES_FILE):exists($$_PRO_FILE_PWD_/dependencies.json): \ @@ -104,7 +108,7 @@ load(qt_common) } qmltypes.target = qmltypes - qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(TARGETPATHBASE, /, .) $$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 |