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 9f36ab1f8d.

Task-number: QTBUG-111785
Pick-to: 6.6
Change-Id: I5e5950f341d6729e15961d6fb3d3f8fe85007e38
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Ahmad Samir 2023-08-24 12:52:14 +03:00
parent 3b187f14a1
commit be0e81d493
1 changed files with 8 additions and 2 deletions

View File

@ -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