diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-03-07 09:51:01 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-08 05:20:11 +0000 |
commit | eced0ccefc0763f792ff6f0523771cb78c45727c (patch) | |
tree | 46e32f57b0df71879eebc8e4d527007c1a6ec579 | |
parent | 805f40924e2ff6949eebc93857866d9b02129982 (diff) | |
download | qtbase-eced0ccefc0763f792ff6f0523771cb78c45727c.tar.gz |
CMake: Fix xmlstreamlint to use the manual test api
Amends e13b57d06ab6e81cf04c090cc46dd23b4f8daccf
Fixes: QTBUG-111774
Task-number: QTBUG-110647
Change-Id: I585cdf20e2e60d4e11170a6e2131b7abc2b7eaf3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit b3a60e49cdd2ff82bb820be4278cf00298777a37)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tests/manual/xmlstreamlint/CMakeLists.txt | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/tests/manual/xmlstreamlint/CMakeLists.txt b/tests/manual/xmlstreamlint/CMakeLists.txt index 1feee1a1c2..5b11c9035d 100644 --- a/tests/manual/xmlstreamlint/CMakeLists.txt +++ b/tests/manual/xmlstreamlint/CMakeLists.txt @@ -1,21 +1,15 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -cmake_minimum_required(VERSION 3.16) -project(xmlstreamlint LANGUAGES CXX) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/xmlstreamlint") - -find_package(Qt6 REQUIRED COMPONENTS Core Xml) - -qt_standard_project_setup() - -qt_add_executable(xmlstreamlint - main.cpp +if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(xmlstreamlint LANGUAGES CXX) + find_package(Qt6BuildInternals COMPONENTS STANDALONE_TEST) + endif() + +qt_internal_add_manual_test(xmlstreamlint + SOURCES + main.cpp ) set_target_properties(xmlstreamlint PROPERTIES @@ -24,12 +18,7 @@ set_target_properties(xmlstreamlint PROPERTIES ) target_link_libraries(xmlstreamlint PRIVATE - Qt6::Core - Qt6::Xml + Qt::Core + Qt::Xml ) -install(TARGETS xmlstreamlint - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) |