summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-06-29 17:37:51 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-07-05 15:09:32 +0200
commit0e56dd2746a8d19d81f71241d6be55e1c94ab037 (patch)
treea74c01bec7b9958059e980409fb2bdc46b08fc0f /tests
parent463d232457834d91e3b6567e52b7f3a18d679541 (diff)
CMake: Make qtbase tests standalone projects
Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I77299f990692b4fe4721a9bc35071608d0d23982 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt6
-rw-r--r--tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt6
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt6
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt6
-rw-r--r--tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt6
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt6
-rw-r--r--tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt6
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusconnection/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbuscontext/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusinterface/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusmarshall/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusmetaobject/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusmetatype/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbuspendingcall/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbuspendingreply/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusreply/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusthreading/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbustype/CMakeLists.txt6
-rw-r--r--tests/auto/dbus/qdbusxmlparser/CMakeLists.txt6
-rw-r--r--tests/auto/other/gestures/CMakeLists.txt6
-rw-r--r--tests/auto/other/languagechange/CMakeLists.txt6
-rw-r--r--tests/auto/other/macgui/CMakeLists.txt6
-rw-r--r--tests/auto/other/macnativeevents/CMakeLists.txt6
-rw-r--r--tests/auto/other/macplist/CMakeLists.txt6
-rw-r--r--tests/auto/other/networkselftest/CMakeLists.txt6
-rw-r--r--tests/auto/other/qaccessibility/CMakeLists.txt6
-rw-r--r--tests/auto/other/qaccessibilitylinux/CMakeLists.txt6
-rw-r--r--tests/auto/other/qaccessibilitymac/CMakeLists.txt6
-rw-r--r--tests/auto/other/qcomplextext/CMakeLists.txt6
-rw-r--r--tests/auto/other/qfocusevent/CMakeLists.txt6
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt6
-rw-r--r--tests/auto/other/qobjectrace/CMakeLists.txt6
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt6
-rw-r--r--tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt6
-rw-r--r--tests/auto/other/toolsupport/CMakeLists.txt6
-rw-r--r--tests/auto/other/xkbkeyboard/CMakeLists.txt6
-rw-r--r--tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt6
-rw-r--r--tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt6
-rw-r--r--tests/auto/printsupport/kernel/qprinter/CMakeLists.txt6
-rw-r--r--tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsql/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqldriver/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqlerror/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqlfield/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqlindex/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqlquery/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqlresult/CMakeLists.txt6
-rw-r--r--tests/auto/sql/kernel/qsqlthread/CMakeLists.txt6
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt6
-rw-r--r--tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt6
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt6
-rw-r--r--tests/auto/sql/models/qsqltablemodel/CMakeLists.txt6
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt6
-rw-r--r--tests/auto/testlib/qsignalspy/CMakeLists.txt6
-rw-r--r--tests/auto/testlib/selftests/CMakeLists.txt6
-rw-r--r--tests/auto/testlib/tostring/CMakeLists.txt6
-rw-r--r--tests/auto/tools/macdeployqt/CMakeLists.txt6
-rw-r--r--tests/auto/tools/moc/CMakeLists.txt5
-rw-r--r--tests/auto/tools/qdbuscpp2xml/CMakeLists.txt6
-rw-r--r--tests/auto/tools/qdbusxml2cpp/CMakeLists.txt6
-rw-r--r--tests/auto/tools/qmake/CMakeLists.txt6
-rw-r--r--tests/auto/tools/qmakelib/CMakeLists.txt6
-rw-r--r--tests/auto/tools/qt_cmake_create/CMakeLists.txt6
-rw-r--r--tests/auto/tools/rcc/CMakeLists.txt6
-rw-r--r--tests/auto/tools/uic/CMakeLists.txt6
-rw-r--r--tests/auto/tools/windeployqt/CMakeLists.txt6
-rw-r--r--tests/auto/wasm/CMakeLists.txt6
-rw-r--r--tests/auto/xml/dom/qdom/CMakeLists.txt6
81 files changed, 485 insertions, 0 deletions
diff --git a/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt
index a7da94d018..3c00393d39 100644
--- a/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtconcurrentfilter Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrentfilter LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrentfilter
SOURCES
tst_qtconcurrentfilter.cpp
diff --git a/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt
index 938dbb418c..12545702eb 100644
--- a/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtconcurrentfiltermapgenerated Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrentfiltermapgenerated LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrentfiltermapgenerated
SOURCES
tst_qtconcurrent_selected_tests.cpp
diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt
index 02f1db9ce8..2eea340795 100644
--- a/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtconcurrentiteratekernel Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrentiteratekernel LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrentiteratekernel
SOURCES
tst_qtconcurrentiteratekernel.cpp
diff --git a/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
index 20a3a1b9a7..62b434a25f 100644
--- a/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtconcurrentmap Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrentmap LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrentmap
SOURCES
tst_qtconcurrentmap.cpp
diff --git a/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
index 2a1523e28e..63f0135467 100644
--- a/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtconcurrentmedian Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrentmedian LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrentmedian
SOURCES
tst_qtconcurrentmedian.cpp
diff --git a/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt
index d199df7e11..a8b6792570 100644
--- a/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtconcurrentrun Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrentrun LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrentrun
SOURCES
tst_qtconcurrentrun.cpp
diff --git a/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
index 21f5625606..89226eaacc 100644
--- a/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtconcurrenttask Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrenttask LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrenttask
SOURCES
tst_qtconcurrenttask.cpp
diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt
index c2f067c3ff..c3c8c9ea59 100644
--- a/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtconcurrentthreadengine Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrentthreadengine LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrentthreadengine
SOURCES
tst_qtconcurrentthreadengine.cpp
diff --git a/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt
index 3f4c8293ac..01cc7613ff 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusabstractadaptor LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
add_subdirectory(qmyserver)
qt_internal_add_test(tst_qdbusabstractadaptor
diff --git a/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt
index a4bb826984..4010ae5682 100644
--- a/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusabstractinterface LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusabstractinterface
SOURCES
interface.cpp
diff --git a/tests/auto/dbus/qdbusconnection/CMakeLists.txt b/tests/auto/dbus/qdbusconnection/CMakeLists.txt
index 6b42f59045..f7b526a0cf 100644
--- a/tests/auto/dbus/qdbusconnection/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusconnection/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusconnection Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusconnection LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusconnection
SOURCES
tst_qdbusconnection.cpp tst_qdbusconnection.h
diff --git a/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt
index bec5974423..d25c57f37f 100644
--- a/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusconnection_delayed Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusconnection_delayed LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusconnection_delayed
SOURCES
tst_qdbusconnection_delayed.cpp
diff --git a/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt
index def3f442ce..3368ce33f0 100644
--- a/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusconnection_no_app Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusconnection_no_app LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusconnection_no_app
SOURCES
../qdbusconnection/tst_qdbusconnection.h
diff --git a/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt
index c7e6eec27e..d6954e4c4b 100644
--- a/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusconnection_no_bus Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusconnection_no_bus LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusconnection_no_bus
SOURCES
tst_qdbusconnection_no_bus.cpp
diff --git a/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt
index 4cbb1eb50c..879572f3bd 100644
--- a/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusconnection_no_libdbus Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusconnection_no_libdbus LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusconnection_no_libdbus
SOURCES
../qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
diff --git a/tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt
index 32dda2f3f3..182007da92 100644
--- a/tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusconnection_signalorder Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusconnection_signalorder LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusconnection_signalorder
SOURCES
tst_qdbusconnection_signalorder.cpp
diff --git a/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt
index aad667e872..80417296a0 100644
--- a/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusconnection_spyhook Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusconnection_spyhook LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusconnection_spyhook
SOURCES
../qdbusconnection/tst_qdbusconnection.h
diff --git a/tests/auto/dbus/qdbuscontext/CMakeLists.txt b/tests/auto/dbus/qdbuscontext/CMakeLists.txt
index fd7176e538..28bb3ebbc7 100644
--- a/tests/auto/dbus/qdbuscontext/CMakeLists.txt
+++ b/tests/auto/dbus/qdbuscontext/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbuscontext Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbuscontext LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbuscontext
SOURCES
tst_qdbuscontext.cpp
diff --git a/tests/auto/dbus/qdbusinterface/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/CMakeLists.txt
index 98ec5cb17b..56439f9ef6 100644
--- a/tests/auto/dbus/qdbusinterface/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusinterface/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusinterface LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
add_subdirectory(qmyserver)
#####################################################################
diff --git a/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt b/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt
index c2df7569c0..bf1ee7953f 100644
--- a/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt
+++ b/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbuslocalcalls Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbuslocalcalls LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbuslocalcalls
SOURCES
tst_qdbuslocalcalls.cpp
diff --git a/tests/auto/dbus/qdbusmarshall/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt
index 45b2bd8136..db24390069 100644
--- a/tests/auto/dbus/qdbusmarshall/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusmarshall LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
if(NOT QT_FEATURE_private_tests)
return()
endif()
diff --git a/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt b/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt
index e7d97a0909..2107d334e0 100644
--- a/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusmetaobject Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusmetaobject LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusmetaobject
SOURCES
tst_qdbusmetaobject.cpp
diff --git a/tests/auto/dbus/qdbusmetatype/CMakeLists.txt b/tests/auto/dbus/qdbusmetatype/CMakeLists.txt
index 93ea98a704..5a1ba189fc 100644
--- a/tests/auto/dbus/qdbusmetatype/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusmetatype/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusmetatype Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusmetatype LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusmetatype
SOURCES
tst_qdbusmetatype.cpp
diff --git a/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt b/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt
index 49a9464372..4493d2364f 100644
--- a/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt
+++ b/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbuspendingcall Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbuspendingcall LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbuspendingcall
SOURCES
tst_qdbuspendingcall.cpp
diff --git a/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt b/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt
index fce3ca4697..52e11b3dbd 100644
--- a/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt
+++ b/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbuspendingreply Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbuspendingreply LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbuspendingreply
SOURCES
tst_qdbuspendingreply.cpp
diff --git a/tests/auto/dbus/qdbusreply/CMakeLists.txt b/tests/auto/dbus/qdbusreply/CMakeLists.txt
index 167755a0b1..6427d92d7c 100644
--- a/tests/auto/dbus/qdbusreply/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusreply/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusreply Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusreply LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusreply
SOURCES
tst_qdbusreply.cpp
diff --git a/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt b/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt
index 99c07b0226..48144cd353 100644
--- a/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusservicewatcher Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusservicewatcher LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusservicewatcher
SOURCES
tst_qdbusservicewatcher.cpp
diff --git a/tests/auto/dbus/qdbusthreading/CMakeLists.txt b/tests/auto/dbus/qdbusthreading/CMakeLists.txt
index 831220d70e..807e401a02 100644
--- a/tests/auto/dbus/qdbusthreading/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusthreading/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusthreading Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusthreading LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusthreading
SOURCES
tst_qdbusthreading.cpp
diff --git a/tests/auto/dbus/qdbustype/CMakeLists.txt b/tests/auto/dbus/qdbustype/CMakeLists.txt
index f66a053acb..1a4e75f61a 100644
--- a/tests/auto/dbus/qdbustype/CMakeLists.txt
+++ b/tests/auto/dbus/qdbustype/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbustype Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbustype LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbustype
SOURCES
tst_qdbustype.cpp
diff --git a/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt b/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt
index bf777c4227..6d92443213 100644
--- a/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusxmlparser Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusxmlparser LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusxmlparser
SOURCES
tst_qdbusxmlparser.cpp
diff --git a/tests/auto/other/gestures/CMakeLists.txt b/tests/auto/other/gestures/CMakeLists.txt
index 565ee19438..815846305a 100644
--- a/tests/auto/other/gestures/CMakeLists.txt
+++ b/tests/auto/other/gestures/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_gestures Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_gestures LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_gestures
SOURCES
tst_gestures.cpp
diff --git a/tests/auto/other/languagechange/CMakeLists.txt b/tests/auto/other/languagechange/CMakeLists.txt
index af81580bbf..07f3547d58 100644
--- a/tests/auto/other/languagechange/CMakeLists.txt
+++ b/tests/auto/other/languagechange/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_languagechange Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_languagechange LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_languagechange
SOURCES
tst_languagechange.cpp
diff --git a/tests/auto/other/macgui/CMakeLists.txt b/tests/auto/other/macgui/CMakeLists.txt
index 3344c2accd..9fb51b40b6 100644
--- a/tests/auto/other/macgui/CMakeLists.txt
+++ b/tests/auto/other/macgui/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_macgui LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
if(NOT APPLE)
return()
endif()
diff --git a/tests/auto/other/macnativeevents/CMakeLists.txt b/tests/auto/other/macnativeevents/CMakeLists.txt
index 830ba618f9..c44cf61920 100644
--- a/tests/auto/other/macnativeevents/CMakeLists.txt
+++ b/tests/auto/other/macnativeevents/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_macnativeevents LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
if(NOT APPLE)
return()
endif()
diff --git a/tests/auto/other/macplist/CMakeLists.txt b/tests/auto/other/macplist/CMakeLists.txt
index daac225d31..6a98d4dc16 100644
--- a/tests/auto/other/macplist/CMakeLists.txt
+++ b/tests/auto/other/macplist/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_macplist LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
if(NOT TARGET Qt::Widgets)
return()
endif()
diff --git a/tests/auto/other/networkselftest/CMakeLists.txt b/tests/auto/other/networkselftest/CMakeLists.txt
index f0fb3c2e6e..6491c510f6 100644
--- a/tests/auto/other/networkselftest/CMakeLists.txt
+++ b/tests/auto/other/networkselftest/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_networkselftest Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_networkselftest LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_networkselftest
SOURCES
tst_networkselftest.cpp
diff --git a/tests/auto/other/qaccessibility/CMakeLists.txt b/tests/auto/other/qaccessibility/CMakeLists.txt
index a3372456db..9160bafe52 100644
--- a/tests/auto/other/qaccessibility/CMakeLists.txt
+++ b/tests/auto/other/qaccessibility/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qaccessibility LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
if(NOT QT_FEATURE_accessibility)
return()
endif()
diff --git a/tests/auto/other/qaccessibilitylinux/CMakeLists.txt b/tests/auto/other/qaccessibilitylinux/CMakeLists.txt
index 445c33e912..5c85827a3b 100644
--- a/tests/auto/other/qaccessibilitylinux/CMakeLists.txt
+++ b/tests/auto/other/qaccessibilitylinux/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qaccessibilitylinux LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
if (NOT QT_FEATURE_accessibility OR NOT TARGET Qt::LinuxAccessibilitySupportPrivate
OR (QT_BUILD_STANDALONE_TESTS AND QT_WILL_INSTALL))
return()
diff --git a/tests/auto/other/qaccessibilitymac/CMakeLists.txt b/tests/auto/other/qaccessibilitymac/CMakeLists.txt
index 93692c660d..66896ed384 100644
--- a/tests/auto/other/qaccessibilitymac/CMakeLists.txt
+++ b/tests/auto/other/qaccessibilitymac/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qaccessibilitymac LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
if(NOT APPLE)
return()
endif()
diff --git a/tests/auto/other/qcomplextext/CMakeLists.txt b/tests/auto/other/qcomplextext/CMakeLists.txt
index 1e1b6efdec..74996c7ad7 100644
--- a/tests/auto/other/qcomplextext/CMakeLists.txt
+++ b/tests/auto/other/qcomplextext/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qcomplextext Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qcomplextext LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
# Collect test data
list(APPEND test_data "data")
diff --git a/tests/auto/other/qfocusevent/CMakeLists.txt b/tests/auto/other/qfocusevent/CMakeLists.txt
index 5cde50dd9e..61682af4e7 100644
--- a/tests/auto/other/qfocusevent/CMakeLists.txt
+++ b/tests/auto/other/qfocusevent/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qfocusevent Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qfocusevent LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qfocusevent
SOURCES
tst_qfocusevent.cpp
diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt
index 46073647fb..313d9464a3 100644
--- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt
+++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qnetworkaccessmanager_and_qprogressdialog Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qnetworkaccessmanager_and_qprogressdialog LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qnetworkaccessmanager_and_qprogressdialog
SOURCES
tst_qnetworkaccessmanager_and_qprogressdialog.cpp
diff --git a/tests/auto/other/qobjectrace/CMakeLists.txt b/tests/auto/other/qobjectrace/CMakeLists.txt
index c5b30d9792..6516c9ee73 100644
--- a/tests/auto/other/qobjectrace/CMakeLists.txt
+++ b/tests/auto/other/qobjectrace/CMakeLists.txt
@@ -5,6 +5,12 @@
## qobjectrace Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qobjectrace LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qobjectrace
SOURCES
tst_qobjectrace.cpp
diff --git a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt
index aa899958e4..3383677009 100644
--- a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt
+++ b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qprocess_and_guieventloop Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qprocess_and_guieventloop LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qprocess_and_guieventloop
SOURCES
tst_qprocess_and_guieventloop.cpp
diff --git a/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt b/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt
index bd9ac9e6a2..a405f54151 100644
--- a/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt
+++ b/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsharedpointer_and_qwidget Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsharedpointer_and_qwidget LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsharedpointer_and_qwidget
SOURCES
tst_qsharedpointer_and_qwidget.cpp
diff --git a/tests/auto/other/toolsupport/CMakeLists.txt b/tests/auto/other/toolsupport/CMakeLists.txt
index 824f25f260..5b2cc0c0e2 100644
--- a/tests/auto/other/toolsupport/CMakeLists.txt
+++ b/tests/auto/other/toolsupport/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_toolsupport Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_toolsupport LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_toolsupport
SOURCES
tst_toolsupport.cpp
diff --git a/tests/auto/other/xkbkeyboard/CMakeLists.txt b/tests/auto/other/xkbkeyboard/CMakeLists.txt
index 82a17f3e73..06e471c68b 100644
--- a/tests/auto/other/xkbkeyboard/CMakeLists.txt
+++ b/tests/auto/other/xkbkeyboard/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_xkbkeyboard Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_xkbkeyboard LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_xkbkeyboard
SOURCES
tst_xkbkeyboard.cpp
diff --git a/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt b/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt
index f3cfd65928..64a7792d77 100644
--- a/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt
+++ b/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qabstractprintdialog Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qabstractprintdialog LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qabstractprintdialog
SOURCES
tst_qabstractprintdialog.cpp
diff --git a/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt b/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt
index 1ac8a5cb6c..3df4d6e135 100644
--- a/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt
+++ b/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qprintdevice Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qprintdevice LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qprintdevice
SOURCES
tst_qprintdevice.cpp
diff --git a/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt b/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt
index eac48bd383..c861a122d9 100644
--- a/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt
+++ b/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qprinter Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qprinter LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qprinter
SOURCES
tst_qprinter.cpp
diff --git a/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt b/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt
index 9d5aa19389..84d0de4d5e 100644
--- a/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt
+++ b/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qprinterinfo Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qprinterinfo LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qprinterinfo
SOURCES
tst_qprinterinfo.cpp
diff --git a/tests/auto/sql/kernel/qsql/CMakeLists.txt b/tests/auto/sql/kernel/qsql/CMakeLists.txt
index 836e06ce7c..8e0448a786 100644
--- a/tests/auto/sql/kernel/qsql/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsql/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsql Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsql LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsql
SOURCES
tst_qsql.cpp
diff --git a/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt b/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt
index 25e4ff125c..97dbf94af7 100644
--- a/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqldatabase Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqldatabase LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqldatabase
SOURCES
tst_qsqldatabase.cpp
diff --git a/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt b/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt
index 04f41409af..21dd3a6417 100644
--- a/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqldriver Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqldriver LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqldriver
SOURCES
tst_qsqldriver.cpp
diff --git a/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt b/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt
index a456338a91..b604399ef1 100644
--- a/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlerror Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlerror LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlerror
SOURCES
tst_qsqlerror.cpp
diff --git a/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt b/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt
index 9e04209c0a..2fef227201 100644
--- a/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlfield Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlfield LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlfield
SOURCES
tst_qsqlfield.cpp
diff --git a/tests/auto/sql/kernel/qsqlindex/CMakeLists.txt b/tests/auto/sql/kernel/qsqlindex/CMakeLists.txt
index 6752e9764d..3373948b5f 100644
--- a/tests/auto/sql/kernel/qsqlindex/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqlindex/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlindex Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlindex LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlindex
SOURCES
tst_qsqlindex.cpp
diff --git a/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt b/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt
index a8e28704fd..e5a5b2b2f8 100644
--- a/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlquery Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlquery LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlquery
SOURCES
tst_qsqlquery.cpp
diff --git a/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt b/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt
index b648f1eb24..18d46669db 100644
--- a/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlrecord Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlrecord LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlrecord
SOURCES
tst_qsqlrecord.cpp
diff --git a/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt b/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt
index ebb3e255d6..1fc475b144 100644
--- a/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlresult Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlresult LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlresult
SOURCES
testsqldriver.h
diff --git a/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt b/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt
index f18a6e303d..98108528e6 100644
--- a/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt
+++ b/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlthread Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlthread LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlthread
SOURCES
tst_qsqlthread.cpp
diff --git a/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt b/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt
index 5a6fde19d2..d148ce43e2 100644
--- a/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt
+++ b/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlquerymodel Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlquerymodel LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlquerymodel
SOURCES
tst_qsqlquerymodel.cpp
diff --git a/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt b/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt
index f65d3be5db..ea2dc6131d 100644
--- a/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt
+++ b/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlrelationaldelegate Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlrelationaldelegate LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlrelationaldelegate
SOURCES
tst_qsqlrelationaldelegate.cpp
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt b/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt
index accfe0c1fd..dc85845987 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqlrelationaltablemodel Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqlrelationaltablemodel LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqlrelationaltablemodel
SOURCES
tst_qsqlrelationaltablemodel.cpp
diff --git a/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt b/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt
index f2806e03a6..15cbe24ef7 100644
--- a/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt
+++ b/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsqltablemodel Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsqltablemodel LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsqltablemodel
SOURCES
tst_qsqltablemodel.cpp
diff --git a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt
index 3e302c02e7..680fd3753f 100644
--- a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt
+++ b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qabstractitemmodeltester Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qabstractitemmodeltester LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qabstractitemmodeltester
SOURCES
../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../other/qabstractitemmodelutils/dynamictreemodel.h
diff --git a/tests/auto/testlib/qsignalspy/CMakeLists.txt b/tests/auto/testlib/qsignalspy/CMakeLists.txt
index 42aff584ba..3c62050de5 100644
--- a/tests/auto/testlib/qsignalspy/CMakeLists.txt
+++ b/tests/auto/testlib/qsignalspy/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qsignalspy Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qsignalspy LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qsignalspy
SOURCES
tst_qsignalspy.cpp
diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt
index a6bb30194d..d6fc5ddef3 100644
--- a/tests/auto/testlib/selftests/CMakeLists.txt
+++ b/tests/auto/testlib/selftests/CMakeLists.txt
@@ -3,6 +3,12 @@
# The whole file is written manually.
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_selftests LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
include(../../../../src/testlib/selfcover.cmake)
# ------------- Test runner -------------
diff --git a/tests/auto/testlib/tostring/CMakeLists.txt b/tests/auto/testlib/tostring/CMakeLists.txt
index 57fc65d352..cb0bdff847 100644
--- a/tests/auto/testlib/tostring/CMakeLists.txt
+++ b/tests/auto/testlib/tostring/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2023 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_tostring LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_tostring
SOURCES
tst_tostring.cpp
diff --git a/tests/auto/tools/macdeployqt/CMakeLists.txt b/tests/auto/tools/macdeployqt/CMakeLists.txt
index c1c14ae545..5120b474ae 100644
--- a/tests/auto/tools/macdeployqt/CMakeLists.txt
+++ b/tests/auto/tools/macdeployqt/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_macdeployqt Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_macdeployqt LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_macdeployqt
SOURCES
tst_macdeployqt.cpp
diff --git a/tests/auto/tools/moc/CMakeLists.txt b/tests/auto/tools/moc/CMakeLists.txt
index 5250bdc8e1..f2a5a1dbe8 100644
--- a/tests/auto/tools/moc/CMakeLists.txt
+++ b/tests/auto/tools/moc/CMakeLists.txt
@@ -5,6 +5,11 @@
## tst_moc Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_moc LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
set(JSON_HEADERS
backslash-newlines.h
diff --git a/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt b/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt
index 256e65e545..557cf57537 100644
--- a/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt
+++ b/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbuscpp2xml Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbuscpp2xml LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbuscpp2xml
SOURCES
test1.h
diff --git a/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt
index 6a6fde67e2..29278377b6 100644
--- a/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt
+++ b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdbusxml2cpp Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdbusxml2cpp LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qdbusxml2cpp
SOURCES
tst_qdbusxml2cpp.cpp
diff --git a/tests/auto/tools/qmake/CMakeLists.txt b/tests/auto/tools/qmake/CMakeLists.txt
index 49e9426b94..8fe0566baa 100644
--- a/tests/auto/tools/qmake/CMakeLists.txt
+++ b/tests/auto/tools/qmake/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qmake LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/tests/auto/tools/qmakelib/CMakeLists.txt b/tests/auto/tools/qmakelib/CMakeLists.txt
index a95fd85f1f..4c6a1e2a72 100644
--- a/tests/auto/tools/qmakelib/CMakeLists.txt
+++ b/tests/auto/tools/qmakelib/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qmakelib Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qmakelib LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qmakelib
SOURCES
../../../../qmake/library/ioutils.cpp
diff --git a/tests/auto/tools/qt_cmake_create/CMakeLists.txt b/tests/auto/tools/qt_cmake_create/CMakeLists.txt
index 6611471388..7d6c49d141 100644
--- a/tests/auto/tools/qt_cmake_create/CMakeLists.txt
+++ b/tests/auto/tools/qt_cmake_create/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qt_cmake_create LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/tests/auto/tools/rcc/CMakeLists.txt b/tests/auto/tools/rcc/CMakeLists.txt
index b60fc8b618..96863c49bd 100644
--- a/tests/auto/tools/rcc/CMakeLists.txt
+++ b/tests/auto/tools/rcc/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_rcc Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_rcc LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_rcc
SOURCES
tst_rcc.cpp
diff --git a/tests/auto/tools/uic/CMakeLists.txt b/tests/auto/tools/uic/CMakeLists.txt
index 42b4a6b031..2a1d4b5164 100644
--- a/tests/auto/tools/uic/CMakeLists.txt
+++ b/tests/auto/tools/uic/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_uic Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_uic LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_uic
SOURCES
tst_uic.cpp
diff --git a/tests/auto/tools/windeployqt/CMakeLists.txt b/tests/auto/tools/windeployqt/CMakeLists.txt
index 040696415e..9ac0051053 100644
--- a/tests/auto/tools/windeployqt/CMakeLists.txt
+++ b/tests/auto/tools/windeployqt/CMakeLists.txt
@@ -1,5 +1,11 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_windeployqt LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
add_subdirectory(testapp)
add_subdirectory(test)
diff --git a/tests/auto/wasm/CMakeLists.txt b/tests/auto/wasm/CMakeLists.txt
index 0d67ae8e79..cf2aeb9af2 100644
--- a/tests/auto/wasm/CMakeLists.txt
+++ b/tests/auto/wasm/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_wasm Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_localfileapi LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_localfileapi
SOURCES
tst_localfileapi.cpp
diff --git a/tests/auto/xml/dom/qdom/CMakeLists.txt b/tests/auto/xml/dom/qdom/CMakeLists.txt
index 29de35f40d..b08701a640 100644
--- a/tests/auto/xml/dom/qdom/CMakeLists.txt
+++ b/tests/auto/xml/dom/qdom/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qdom Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qdom LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}