From be0e81d493db8a4117a00de21adc39ce02f0ee42 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Thu, 24 Aug 2023 12:52:14 +0300 Subject: [PATCH] Gui: fix CMake warning about unconditionally installed headers qaccessible.h and qplatformaccessibility.h are supposed to always be installed as public headers, regardless of QT_FEATURE_accessibility. Their contents are wrapped in "#if QT_CONFIG(accessibility)", so installing them even if QT_FEATURE_accessibility is not enabled shouldn't be an issue. The warning was about uncoditionally installed header files, "CONDITION_INDEPENDENT_SOURCES", being in a "qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility" call. Thanks to Alexandru for confirming my vague suspicions about the issue in the bug report. This amends commit 9f36ab1f8df7f79ffb78259725110106aa5a8e37. Task-number: QTBUG-111785 Pick-to: 6.6 Change-Id: I5e5950f341d6729e15961d6fb3d3f8fe85007e38 Reviewed-by: Alexey Edelev Reviewed-by: Alexandru Croitor --- src/gui/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index a733e88645..a7bacf4c61 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -465,9 +465,15 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_egl EGL::EGL ) -qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility - CONDITION_INDEPENDENT_SOURCES +# These two headers are always installed, their contents are guarded with +# "#if QT_CONFIG(accessibility)", so if QT_FEATURE_accessibility is not +# enabled, they are just duds. +qt_internal_extend_target(Gui + SOURCES accessible/qaccessible.h accessible/qplatformaccessibility.h +) + +qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility SOURCES accessible/qaccessible.cpp accessible/qaccessible_base.h accessible/qaccessiblebridge.cpp accessible/qaccessiblebridge.h