Fix build without PDF

tst_baseline_painting and tst_qpdfwriter rely on QT_FEATURE_pdf being
enabled, without making it a condition to build the tests.

Don't build the tests with PDF disabled.

Task-number: QTBUG-122137
Pick-to: 6.6 6.5
Change-Id: Idbf03f30557618c83e946a80b7759cd4f6978ad5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 90a6415bedfc4ce1a934c3a36271b20c1a6a606a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Axel Spoerl 2024-02-13 15:52:33 +01:00 committed by Qt Cherry-pick Bot
parent 84bbfd9c62
commit ca34c1c647
2 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,9 @@ add_subdirectory(qpagelayout)
add_subdirectory(qpageranges)
add_subdirectory(qpagesize)
add_subdirectory(qpainter)
add_subdirectory(qpdfwriter)
if (QT_FEATURE_pdf)
add_subdirectory(qpdfwriter)
endif()
add_subdirectory(qpen)
add_subdirectory(qpaintengine)
add_subdirectory(qtransform)

View File

@ -1,7 +1,7 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
if(TARGET Qt::Gui AND TARGET Qt::Network)
if(TARGET Qt::Gui AND TARGET Qt::Network AND QT_FEATURE_pdf)
add_subdirectory(painting)
endif()
if(TARGET Qt::Network AND TARGET Qt::Widgets)