QT_HARMONYOS_EXTRA_PLUGINS
Extra Qt plugins to deploy with the HarmonyOS target.
This property was introduced in Qt 6.12.
Note: This property is in technology preview and may change in future releases.
Note: This property is used only if targeting the HarmonyOS platform.
A list of additional Qt plugins to package into the HAP. This is for plugins that cannot be detected automatically, such as plugins that are loaded only at run-time.
Each list entry is either the name of a CMake plugin target (which is resolved to the plugin's library file) or an absolute path to a plugin library. The plugin's category in the HAP is derived from the name of the plugin library's parent directory, for example imageformats.
set_target_properties(myapp PROPERTIES
QT_HARMONYOS_EXTRA_PLUGINS
"${CMAKE_CURRENT_BINARY_DIR}/imageformats/libqcustomimg.so"
)
This property is for Qt plugins, which are placed into their category directory and loaded by Qt's plugin system. To deploy plain shared libraries, which are placed in the HAP's library directory and resolved by the dynamic linker, use QT_HARMONYOS_EXTRA_LIBS instead.
When adding a plugin that is built as part of your project, also add a build dependency so that the plugin is available before the target is deployed:
add_dependencies(myapp qcustomimg)
See also QT_HARMONYOS_EXTRA_LIBS.