From d546ff93a5be79e3a7aa4e74691aba0563163b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Tue, 27 Feb 2024 13:03:34 +0100 Subject: [PATCH] Do not add PDF-related files to the resources if PDF is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids added resources: ":/qpdf/qpdfa_metadata.xml" ":/qpdf/sRGB2014.icc" Change-Id: I89a130bd281c5550f1c3dcead8336e0c3de6bc84 Reviewed-by: Tor Arne Vestbø (cherry picked from commit 3d31b1953847e9b052812c8b7985d53af2c88385) Reviewed-by: Qt Cherry-pick Bot --- src/gui/CMakeLists.txt | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 7015e1e82fc..3207244afd2 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -286,27 +286,28 @@ qt_internal_add_module(Gui ) # Resources: -set_source_files_properties("../3rdparty/icc/sRGB2014.icc" - PROPERTIES QT_RESOURCE_ALIAS "sRGB2014.icc" -) -set(qpdf_resource_files - "../3rdparty/icc/sRGB2014.icc" - "painting/qpdfa_metadata.xml" -) +if(QT_FEATURE_pdf) + set_source_files_properties("../3rdparty/icc/sRGB2014.icc" + PROPERTIES QT_RESOURCE_ALIAS "sRGB2014.icc" + ) + set(qpdf_resource_files + "../3rdparty/icc/sRGB2014.icc" + "painting/qpdfa_metadata.xml" + ) + qt_internal_add_resource(Gui "qpdf" + PREFIX + "/qpdf/" + BASE + "painting" + FILES + ${qpdf_resource_files} + ) +endif() if(WIN32 OR (UNIX AND NOT APPLE)) set_target_properties(Gui PROPERTIES UNITY_BUILD OFF) # X11 define clashes/Windows oddities. endif() -qt_internal_add_resource(Gui "qpdf" - PREFIX - "/qpdf/" - BASE - "painting" - FILES - ${qpdf_resource_files} -) - qt_internal_add_resource(Gui "gui_shaders" PREFIX "/qt-project.org/gui"