aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview2/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-06-29 18:01:03 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-07-05 12:34:11 +0200
commit03a0e06961e356daf926fd96d8675c4fb1379505 (patch)
tree9805028b04eeba1a320f9306a20e24c83e1c0370 /tests/auto/quick/qquicklistview2/CMakeLists.txt
parent5818f97e70c90c545a745a066b005f595d44c252 (diff)
CMake: Make quick 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 follow script: 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: I7854e7f015535a4835ce3daf816f7f33aa242c2a Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicklistview2/CMakeLists.txt')
-rw-r--r--tests/auto/quick/qquicklistview2/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview2/CMakeLists.txt b/tests/auto/quick/qquicklistview2/CMakeLists.txt
index cc8a6ea726..faa86ce733 100644
--- a/tests/auto/quick/qquicklistview2/CMakeLists.txt
+++ b/tests/auto/quick/qquicklistview2/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_qquicklistview2 LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}