| 1 |
# Copyright (C) 2022 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: BSD-3-Clause |
| 3 |
|
| 4 |
##################################################################### |
| 5 |
## tst_qfontmetrics 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_qfontmetrics LANGUAGES CXX) |
| 11 |
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) |
| 12 |
endif() |
| 13 |
|
| 14 |
qt_internal_add_test(tst_qfontmetrics |
| 15 |
SOURCES |
| 16 |
tst_qfontmetrics.cpp |
| 17 |
LIBRARIES |
| 18 |
Qt::CorePrivate |
| 19 |
Qt::Gui |
| 20 |
Qt::GuiPrivate |
| 21 |
) |
| 22 |
|
| 23 |
# Resources: |
| 24 |
set_source_files_properties("../../../shared/resources/testfont.ttf" |
| 25 |
PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf" |
| 26 |
) |
| 27 |
set_source_files_properties("../../../shared/resources/testfont_linemetrics.otf" |
| 28 |
PROPERTIES QT_RESOURCE_ALIAS "testfont_linemetrics.otf" |
| 29 |
) |
| 30 |
set_source_files_properties("../../../shared/resources/testfont_bidimarks.ttf" |
| 31 |
PROPERTIES QT_RESOURCE_ALIAS "testfont_bidimarks.ttf" |
| 32 |
) |
| 33 |
set(testfont_resource_files |
| 34 |
"../../../shared/resources/testfont.ttf" |
| 35 |
"../../../shared/resources/testfont_linemetrics.otf" |
| 36 |
"../../../shared/resources/testfont_bidimarks.ttf" |
| 37 |
"ucs4font.ttf" |
| 38 |
) |
| 39 |
|
| 40 |
qt_internal_add_resource(tst_qfontmetrics "testfont" |
| 41 |
PREFIX |
| 42 |
"/fonts" |
| 43 |
FILES |
| 44 |
${testfont_resource_files} |
| 45 |
) |
| 46 |
|