diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-06-02 11:10:01 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-08-25 10:36:00 +0000 |
commit | f7857d7f867ae5be0f910f802daaf4cec69c8a58 (patch) | |
tree | 2888728f61d747f295630bec7922cf49b53e6a55 /qmake | |
parent | 823ad1424a1aac6dff96fa8495326dd52eb77b47 (diff) |
Doc: Improve documentation of ANDROID_EXTRA_PLUGINS qmake variable
Clarify that the variable must point to a directory with a specific
structure, and how the name mangling is applied to the deployed
plugins.
Fixes: QTBUG-60022
Change-Id: I949cd73f65f86d4902eeab41fa7e5c6e6ffe44c3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit 1ff82d1ebaa7b9151bab449fd29b76d59654037b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 33ad78f540..05116b7b1b 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -999,10 +999,41 @@ \note This variable applies only to Android targets. - Specifies different resources that your application has to bundle but that - cannot be delivered through the assets system, such as QML plugins. With this - variable, \l androiddeployqt will make sure everything is packaged and - deployed properly. + Specifies a path to C++ plugins or resources that your application has to bundle + but that cannot be delivered through the assets system, such as QML plugins. + With this variable, \l androiddeployqt will make sure everything is packaged + and deployed properly. + + \c ANDROID_EXTRA_PLUGINS must point to the directory where the extra plugin(s) + are built. In addition, the build directory structure must follow a naming + convention similar to Qt plugins, that is, \e {plugins/<plugin name>}. + + The plugins libraries should have the name format \e {libplugins_<type>_<name>_<abi>.so}. + To achieve that the plugin pro file could be defined as follows: + + \badcode + TEMPLATE = lib + CONFIG += plugin + + PLUGIN_TYPE = imageformats + DESTDIR = $$top_builddir/plugins/myplugin + TARGET = $$qt5LibraryTarget(myplugin, "plugins/$$PLUGIN_TYPE/") + \endcode + + with top_builddir defined in .qmake.conf as: + \badcode + top_builddir=$$shadowed($$PWD) + \endcode + + This will ensure that the correct name mangling is applied to the plugin + library (\e plugins/myplugin/libplugins_imageformats_myplugin_armeabi-v7a.so). + + Then, assuming an extra image format plugin \e myplugin is built as + \e {$$DESTDIR/plugins/myplugin/}, the following ensures it is packaged correctly: + + \badcode + ANDROID_EXTRA_PLUGINS += $$top_builddir/plugins + \endcode \target ANDROID_FEATURES \section1 ANDROID_FEATURES |