diff options
author | Kai Koehne <kai.koehne@qt.io> | 2019-02-25 13:33:18 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2019-02-26 07:32:22 +0000 |
commit | bc107d81004a5f3929f30088f4a58a221bea5c3b (patch) | |
tree | 7d0793a1deafe5c57544d289c5d67db9c713272a /mkspecs | |
parent | 04479f19522879dad821b0e643d0576d19a6d689 (diff) |
Allow QML plugin to specify import name explicitly
For creating the qmlplugindump rule we need the name of the import. So
far we're trying to derive this from the directory name, but that
becomes complicated if versions are included, like
QtQuick/Controls.2/Fusion
Instead of trying to tweak the regexp even more to capture this, we
now allow a plugin to set it's name explicitly via IMPORT_NAME.
Change-Id: Ie75dae7d41398b3ac19ccb6910002b6fad009891
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qml_plugin.prf | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index ad8ecdf5f1..02068ae766 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -94,7 +94,7 @@ load(qt_common) } 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 +104,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, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE qmltypes.depends = $$QMAKE_RESOLVED_TARGET } else { qmltypes.CONFIG += recursive |