Frameworks and pkgconfig files
Harald Sitter
sitter at kde.org
Wed Nov 29 10:41:11 UTC 2017
On Wed, Nov 29, 2017 at 9:43 AM, Christophe Giboudeaux
<christophe at krop.fr> wrote:
> Hello,
>
> in https://bugs.kde.org/386933, the bug reporter mentions the pkgconfig file
> name shall match the library one.
I cannot find any such requirement. It is *suggested* to have one
config per lib with the config name matching the lib name, I don't see
it required though.
> Do we have a policy about the pkgconfig stuff ?
Not that I know of (neither do we have one for cmake config packages mind you).
> Only a couple frameworks install such files with different scheme (Baloo
> (uppercase B), libKF5Attica (library name), phonon4qt5...) and the 'name' var
> doesn't always match the filename (Phonon4Qt5).
Library-based naming IMO is fairly unsuitable to begin with as you
search for a "package" not a library, and one package may have
multiple libraries in its link list. So given it makes no difference
anyway I would argue that ideally the pc files name should be the same
as the cmake config package names rather than the library . To that
end, the mkspecs for qmake maybe should also be consistent.
What I would suggest is `find_package(KF5Attica)` in cmake would be
equal to `PKG_CHECK_MODULES([ATTICA], [KF5Attica])` in autotools would
be equal to `QT += KF5Attica`.
Whether consistent naming is worth the fuss of establishing a policy I
am not entirely convinced though.
All this said, backwards compatibility prevents us from changing this
in KF5 anyway. So at best this is KF6 material.
HS
More information about the Kde-buildsystem
mailing list