From f7857d7f867ae5be0f910f802daaf4cec69c8a58 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 2 Jun 2020 11:10:01 +0200 Subject: 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 (cherry picked from commit 1ff82d1ebaa7b9151bab449fd29b76d59654037b) Reviewed-by: Qt Cherry-pick Bot --- qmake/doc/src/qmake-manual.qdoc | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to 'qmake') 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/}. + + The plugins libraries should have the name format \e {libplugins___.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 -- cgit v1.2.3