summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qfactoryloader/test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/plugin/qfactoryloader/test')
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt42
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt64
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/test.pro30
3 files changed, 14 insertions, 122 deletions
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt
deleted file mode 100644
index 9e3a686340..0000000000
--- a/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-# Generated from test.pro.
-
-#####################################################################
-## tst_qfactoryloader Test:
-#####################################################################
-
-qt_add_test(tst_qfactoryloader
- OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
- SOURCES
- ../plugin1/plugininterface1.h
- ../plugin2/plugininterface2.h
- ../tst_qfactoryloader.cpp
- PUBLIC_LIBRARIES
- Qt::CorePrivate
-)
-
-## Scopes:
-#####################################################################
-
-qt_extend_target(tst_qfactoryloader CONDITION NOT QT_FEATURE_library
- PUBLIC_LIBRARIES
- # Remove: L
- ../bin/
- plugin1
- plugin2
-)
-
-if(ANDROID)
- # Resources:
- set(qmake_libs_resource_files
- ${CMAKE_CURRENT_BINARY_DIR}/../bin
- )
-
- qt_add_resource(tst_qfactoryloader "qmake_libs"
- PREFIX
- "android_test_data"
- BASE
- "${CMAKE_CURRENT_BINARY_DIR}/.."
- FILES
- ${qmake_libs_resource_files}
- )
-endif()
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
index 7d10294399..fb3b6f5acb 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
@@ -1,68 +1,32 @@
-# Generated from test.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_qfactoryloader Test:
#####################################################################
-qt_add_test(tst_qfactoryloader
+qt_internal_add_test(tst_qfactoryloader
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
SOURCES
../plugin1/plugininterface1.h
../plugin2/plugininterface2.h
../tst_qfactoryloader.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
+ tst_qfactoryloader_staticplugin
)
-## Scopes:
-#####################################################################
-
-# special case begin
-if (NOT QT_FEATURE_library)
- target_link_directories(tst_qfactoryloader PRIVATE "${CMAKE_CURRENT_BINARY_DIR}../bin")
-endif()
-# special case end
-
-qt_extend_target(tst_qfactoryloader CONDITION NOT QT_FEATURE_library
- PUBLIC_LIBRARIES
- # Remove: L
- # special case begin
- # this part is handled as a special case above
- # ../bin/
- # special case end
+qt_internal_extend_target(tst_qfactoryloader CONDITION NOT QT_FEATURE_library
+ LIBRARIES
+ tst_qfactoryloader_plugin1
+ tst_qfactoryloader_plugin2
)
-if(ANDROID)
- # special case begin
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/../bin/libplugin1.so
- PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY plugin1
- )
-
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/../bin/libplugin2.so
- PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY plugin2
- )
- # Resources:
- if (ANDROID)
- set(qmake_libs_resource_files
- bin/libplugin1_${CMAKE_ANDROID_ARCH_ABI}.so
- bin/libplugin2_${CMAKE_ANDROID_ARCH_ABI}.so
- )
- else()
- set(qmake_libs_resource_files
- bin/libplugin1.so
- bin/libplugin2.so
- )
- endif()
- # special case end
+add_dependencies(tst_qfactoryloader tst_qfactoryloader_plugin1 tst_qfactoryloader_plugin2)
- qt_add_resource(tst_qfactoryloader "qmake_libs"
- PREFIX
- "android_test_data"
- BASE
- "${CMAKE_CURRENT_BINARY_DIR}/.."
- FILES
- ${qmake_libs_resource_files}
+if(ANDROID)
+ # QT_ANDROID_EXTRA_PLUGINS requires a list of directories, not files!
+ set_target_properties(tst_qfactoryloader PROPERTIES
+ QT_ANDROID_EXTRA_PLUGINS "${CMAKE_CURRENT_BINARY_DIR}/../bin"
)
endif()
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
deleted file mode 100644
index 5e4d65a49f..0000000000
--- a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
+++ /dev/null
@@ -1,30 +0,0 @@
-CONFIG += testcase
-TARGET = ../tst_qfactoryloader
-QT = core-private testlib
-
-SOURCES = \
- ../tst_qfactoryloader.cpp
-
-HEADERS = \
- ../plugin1/plugininterface1.h \
- ../plugin2/plugininterface2.h
-
-win32 {
- CONFIG(debug, debug|release) {
- TARGET = ../../debug/tst_qfactoryloader
- } else {
- TARGET = ../../release/tst_qfactoryloader
- }
-}
-
-!qtConfig(library) {
- LIBS += -L ../bin/ -lplugin1 -lplugin2
-}
-
-android {
- libs.prefix = android_test_data
- libs.base = $$OUT_PWD/..
- libs.files += $$OUT_PWD/../bin
-
- RESOURCES += libs
-}