diff options
Diffstat (limited to 'tests/auto/corelib/plugin/qpluginloader/tst')
3 files changed, 39 insertions, 75 deletions
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt deleted file mode 100644 index 0b0d76bbc4..0000000000 --- a/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -# Generated from tst.pro. - -##################################################################### -## tst_qpluginloader Test: -##################################################################### - -# Collect test data -list(APPEND test_data "../elftest") -list(APPEND test_data "../machtest") - -qt_add_test(tst_qpluginloader - OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" - SOURCES - ../fakeplugin.cpp - ../theplugin/plugininterface.h - ../tst_qpluginloader.cpp - PUBLIC_LIBRARIES - staticplugin - TESTDATA ${test_data} -) - -## Scopes: -##################################################################### - -qt_extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests - PUBLIC_LIBRARIES - Qt::CorePrivate -) - -qt_extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release - PUBLIC_LIBRARIES - # Remove: L../staticplugin/debug -) - -qt_extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug - PUBLIC_LIBRARIES - # Remove: L../staticplugin/release -) - -qt_extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release - PUBLIC_LIBRARIES - # Remove: L../staticplugin -) diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt index 0b0d76bbc4..16dd1cf9cf 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt +++ b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from tst.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_qpluginloader Test: @@ -8,36 +9,63 @@ list(APPEND test_data "../elftest") list(APPEND test_data "../machtest") -qt_add_test(tst_qpluginloader +qt_internal_add_test(tst_qpluginloader OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" SOURCES ../fakeplugin.cpp ../theplugin/plugininterface.h ../tst_qpluginloader.cpp - PUBLIC_LIBRARIES + LIBRARIES staticplugin TESTDATA ${test_data} ) +add_dependencies(tst_qpluginloader tst_qpluginloaderlib staticplugin theplugin) +if (UNIX) + if(NOT APPLE) + add_dependencies(tst_qpluginloader theoldplugin) + endif() + if (NOT ANDROID AND NOT APPLE) + add_dependencies(tst_qpluginloader almostplugin) + endif() +endif() + +if(ANDROID) + add_compile_definitions(ANDROID_ARCH="${CMAKE_ANDROID_ARCH_ABI}") + set(plugins + theplugin + theoldplugin + tst_qpluginloaderlib + ) + set(extra_libs) + foreach(plugin IN LISTS plugins) + list(APPEND extra_libs + "${CMAKE_CURRENT_BINARY_DIR}/../bin/lib${plugin}_${CMAKE_ANDROID_ARCH_ABI}.so") + endforeach() + set_target_properties(tst_qpluginloader PROPERTIES + QT_ANDROID_EXTRA_LIBS "${extra_libs}" + ) +endif() + ## Scopes: ##################################################################### -qt_extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests - PUBLIC_LIBRARIES +qt_internal_extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests + LIBRARIES Qt::CorePrivate ) -qt_extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release - PUBLIC_LIBRARIES +qt_internal_extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release + LIBRARIES # Remove: L../staticplugin/debug ) -qt_extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug - PUBLIC_LIBRARIES +qt_internal_extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug + LIBRARIES # Remove: L../staticplugin/release ) -qt_extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release - PUBLIC_LIBRARIES +qt_internal_extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release + LIBRARIES # Remove: L../staticplugin ) diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro deleted file mode 100644 index d49bff14fd..0000000000 --- a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro +++ /dev/null @@ -1,21 +0,0 @@ -CONFIG += testcase -TARGET = ../tst_qpluginloader -QT = core testlib -qtConfig(private_tests): QT += core-private -SOURCES = ../tst_qpluginloader.cpp ../fakeplugin.cpp -HEADERS = ../theplugin/plugininterface.h - -win32:debug_and_release { - CONFIG(debug, debug|release) { - TARGET = ../../debug/tst_qpluginloader - LIBS += -L../staticplugin/debug - } else { - TARGET = ../../release/tst_qpluginloader - LIBS += -L../staticplugin/release - } -} else { - LIBS += -L../staticplugin -} -LIBS += -lstaticplugin - -TESTDATA += ../elftest ../machtest |