From 5818f97e70c90c545a745a066b005f595d44c252 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 29 Jun 2023 17:46:25 +0200 Subject: CMake: Make qml 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: Ia68c9d263e7454f0c4a26c29b10f1c535d08e2f6 Reviewed-by: Joerg Bornemann Reviewed-by: Amir Masoud Abdol --- tests/auto/qml/qmllint/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto/qml/qmllint') diff --git a/tests/auto/qml/qmllint/CMakeLists.txt b/tests/auto/qml/qmllint/CMakeLists.txt index 4d85c28ced..5a3e2d9c0d 100644 --- a/tests/auto/qml/qmllint/CMakeLists.txt +++ b/tests/auto/qml/qmllint/CMakeLists.txt @@ -7,6 +7,12 @@ ## tst_qmllint Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qmllint LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + # Collect test data file(GLOB_RECURSE test_data_glob RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} -- cgit v1.2.3