diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-03-24 17:20:46 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2022-03-25 22:43:49 +0100 |
commit | 862f42e806dce4051fd1a58c6ad2844a45223807 (patch) | |
tree | 36e0451b708f40509476794d136dc3fa7bbe354d /tests/auto/corelib/plugin/qfactoryloader/plugin2 | |
parent | 904d613a51d77bb75fc093ce70685fe9483e3f17 (diff) |
Android: activate tst_qfactoryloader
- Use QT_ANDROID_EXTRA_PLUGINS to specify a correct plugins directory
- Update plugin names on Android to match the expected format
- Add explicit dependency on the plugins, so that they always get built
and included in the APK
- Update the test code to respect the fact that plugins are packed
differently on Android.
All these steps allow to enable this test for Android in CMakeLists.txt
Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: I09e389c761688cea216d8922b94ea3a2600f7a67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'tests/auto/corelib/plugin/qfactoryloader/plugin2')
-rw-r--r-- | tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt index a384a40412..765ad0b262 100644 --- a/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt +++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt @@ -4,7 +4,7 @@ ## plugin2 Generic Library: ##################################################################### -qt_internal_add_cmake_library(plugin2 +qt_internal_add_cmake_library(tst_qfactoryloader_plugin2 MODULE INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qfactoryloader/bin" OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin" @@ -14,17 +14,17 @@ qt_internal_add_cmake_library(plugin2 Qt::Core ) -#### Keys ignored in scope 1:.:.:plugin2.pro:<TRUE>: -# INSTALLS = "target" -# TEMPLATE = "lib" -# target.path = "$$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin" +if(ANDROID) + # On Android the plugins must match the following mask: + # "libplugins_{suffix}_*.so" + # and the testcase uses "bin" as a suffix + set_target_properties(tst_qfactoryloader_plugin2 PROPERTIES + OUTPUT_NAME "plugins_bin_tst_qfactoryloader_plugin2") +endif() -## Scopes: -##################################################################### - -qt_internal_extend_target(plugin2 CONDITION NOT QT_FEATURE_library +qt_internal_extend_target(tst_qfactoryloader_plugin2 CONDITION NOT QT_FEATURE_library DEFINES QT_STATICPLUGIN ) -qt_autogen_tools_initial_setup(plugin2) +qt_autogen_tools_initial_setup(tst_qfactoryloader_plugin2) |