Initially, I thought it's a Qt Creator problem too and filed an issue there:
https://bugreports.qt.io/browse/QTCREATORBUG-28638
It happened out it's not a bug but a feature, also backed by CMake
maintainers (see the link in the OP):
The build system is our source of truth for which file belongs to
which project. Earlier versions of Qt Creator attempted to work
around incomplete project files using heuristics, which lead to
various problems. We don't want to go back to that.
So the issue was closed as "Won't fix" upstream, and the only way to fix
it seems to be adjust our CMake files.
We also tried to do it in the other places:
polkit-kde-agent-1!18 (merged)
<https://invent.kde.org/plasma/polkit-kde-agent-1/-/merge_requests/18>
So I really hope it won't face much resistance here, too.
On 18.01.2023 15:01, David Redondo wrote:
Am Samstag, 7. Januar 2023, 16:40:27 CET schrieb Andrey Butirsky:
Other IDEs should benefit too.
KDevelop (and I think Kate too) displays headers in "Project" view without
this. I am not convinced of this amount of work (and cluttering of our CMake
files) to workaround IDE/editor deficiencies. While I don't know how easy it
is to get at CMake is likely to have include info.
David