| 1 |
# Copyright (C) 2022 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: BSD-3-Clause |
| 3 |
|
| 4 |
##################################################################### |
| 5 |
## tst_qicon_svg Test: |
| 6 |
##################################################################### |
| 7 |
|
| 8 |
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) |
| 9 |
cmake_minimum_required(VERSION 3.16) |
| 10 |
project(tst_qicon_svg LANGUAGES CXX) |
| 11 |
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) |
| 12 |
endif() |
| 13 |
|
| 14 |
# Collect test data |
| 15 |
file(GLOB_RECURSE test_data_glob |
| 16 |
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} |
| 17 |
icons/*) |
| 18 |
list(APPEND test_data ${test_data_glob}) |
| 19 |
|
| 20 |
qt_internal_add_test(tst_qicon_svg |
| 21 |
LOWDPI |
| 22 |
SOURCES |
| 23 |
tst_qicon_svg.cpp |
| 24 |
LIBRARIES |
| 25 |
Qt::Gui |
| 26 |
Qt::GuiPrivate |
| 27 |
Qt::Svg |
| 28 |
TESTDATA ${test_data} |
| 29 |
) |
| 30 |
|
| 31 |
# Resources: |
| 32 |
set(tst_qicon_svg_resource_files |
| 33 |
"icons/heart.svg" |
| 34 |
"icons/heart.svgz" |
| 35 |
"icons/image.png" |
| 36 |
"icons/rect.svg" |
| 37 |
"icons/rect_size_100percent.svg" |
| 38 |
"icons/trash.svg" |
| 39 |
"icons/triangle.svg" |
| 40 |
"icons/testtheme/svg/actions/heart.svg" |
| 41 |
"icons/testtheme/16x16/actions/heart.png" |
| 42 |
"icons/testtheme/index.theme" |
| 43 |
) |
| 44 |
|
| 45 |
qt_internal_add_resource(tst_qicon_svg "tst_qicon_svg" |
| 46 |
PREFIX |
| 47 |
"/" |
| 48 |
FILES |
| 49 |
${tst_qicon_svg_resource_files} |
| 50 |
) |
| 51 |
|