From 90a6415bedfc4ce1a934c3a36271b20c1a6a606a Mon Sep 17 00:00:00 2001 From: Axel Spoerl Date: Tue, 13 Feb 2024 15:52:33 +0100 Subject: [PATCH] Fix build without PDF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.7 6.6 6.5 Change-Id: Idbf03f30557618c83e946a80b7759cd4f6978ad5 Reviewed-by: Tor Arne Vestbø --- tests/auto/gui/painting/CMakeLists.txt | 4 +++- tests/baseline/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/gui/painting/CMakeLists.txt b/tests/auto/gui/painting/CMakeLists.txt index 2c23cfab07c..b49a80b1803 100644 --- a/tests/auto/gui/painting/CMakeLists.txt +++ b/tests/auto/gui/painting/CMakeLists.txt @@ -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) diff --git a/tests/baseline/CMakeLists.txt b/tests/baseline/CMakeLists.txt index 97d0a13e3ee..037ffd9e0e0 100644 --- a/tests/baseline/CMakeLists.txt +++ b/tests/baseline/CMakeLists.txt @@ -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)