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. Pick-to: 5.15 Fixes: QTBUG-60022 Change-Id: I949cd73f65f86d4902eeab41fa7e5c6e6ffe44c3 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
parent
f325bac02e
commit
1ff82d1eba
@ -993,10 +993,41 @@
|
|||||||
|
|
||||||
\note This variable applies only to Android targets.
|
\note This variable applies only to Android targets.
|
||||||
|
|
||||||
Specifies different resources that your application has to bundle but that
|
Specifies a path to C++ plugins or resources that your application has to bundle
|
||||||
cannot be delivered through the assets system, such as QML plugins. With this
|
but that cannot be delivered through the assets system, such as QML plugins.
|
||||||
variable, \l androiddeployqt will make sure everything is packaged and
|
With this variable, \l androiddeployqt will make sure everything is packaged
|
||||||
deployed properly.
|
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
|
\target ANDROID_FEATURES
|
||||||
\section1 ANDROID_FEATURES
|
\section1 ANDROID_FEATURES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user