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:
parent
8e27e31649
commit
b3a60e49cd
@ -1,20 +1,14 @@
|
|||||||
# Copyright (C) 2022 The Qt Company Ltd.
|
# Copyright (C) 2022 The Qt Company Ltd.
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
project(xmlstreamlint LANGUAGES CXX)
|
project(xmlstreamlint LANGUAGES CXX)
|
||||||
|
find_package(Qt6BuildInternals COMPONENTS STANDALONE_TEST)
|
||||||
if(NOT DEFINED INSTALL_EXAMPLESDIR)
|
|
||||||
set(INSTALL_EXAMPLESDIR "examples")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/xmlstreamlint")
|
qt_internal_add_manual_test(xmlstreamlint
|
||||||
|
SOURCES
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Core Xml)
|
|
||||||
|
|
||||||
qt_standard_project_setup()
|
|
||||||
|
|
||||||
qt_add_executable(xmlstreamlint
|
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -24,12 +18,7 @@ set_target_properties(xmlstreamlint PROPERTIES
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(xmlstreamlint PRIVATE
|
target_link_libraries(xmlstreamlint PRIVATE
|
||||||
Qt6::Core
|
Qt::Core
|
||||||
Qt6::Xml
|
Qt::Xml
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS xmlstreamlint
|
|
||||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
|
||||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
|
||||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user