CMake: Fix xmlstreamlint to use the manual test api

Amends e13b57d06a

Pick-to: 6.5.0 6.5
Fixes: QTBUG-111774
Task-number: QTBUG-110647
Change-Id: I585cdf20e2e60d4e11170a6e2131b7abc2b7eaf3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2023-03-07 09:51:01 +01:00
parent 8e27e31649
commit b3a60e49cd

View File

@ -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 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()
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
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}"
)