Includes (was: Re: KF6 meeting notes 2022-01-04)
Friedrich W. H. Kossebau
kossebau at kde.org
Tue Jan 4 18:41:45 GMT 2022
Am Dienstag, 4. Januar 2022, 18:07:45 CET schrieb Volker Krause:
> - in some places includes with the framework prefix don't seem to work
> anymore (ie. <KFramework/KBla> vs <KBla>), any idea where those extra
> include directories came from/got lost?
FTR, pointed on irc to some insights about design of include folder layout
noted in an older comment here:
https://invent.kde.org/pim/akonadi/-/merge_requests/70#note_300273
And follow-up on what makes path relative to "include/KF5" work:
https://invent.kde.org/pim/akonadi/-/merge_requests/70#note_300304
Seems at least the version files as currently installed do not match the
pattern as described above, but that might have been just a mistake which
happened to work, so no-one noticed.
Installing kfoo_version.h instead of to include/KF5 to include/KF5/KFoo should
still work as before., at least for anything which reads include paths from
installed metadata like cmake config files, pkgconfig files or qmake pri
files.
The currently by KF5 modules provided pkgconfig files or qmake pri files seem
to even never add "include/KF5" in the samples I looked at, so any #include
<kfoo_version.h> would have never worked with them.
So I would propose to fix things and adapt the version files to be installed
into the module prefix now already. Any serious project should get the include
paths from the build metadata and not try to heuristically find version
headers and try to heuristically detect the version from that.
Cheeers
Friedrich
More information about the Kde-frameworks-devel
mailing list