[cmake-developers] Using pkgconf
Brad King
brad.king at kitware.com
Thu Jun 14 14:54:25 EDT 2018
On 06/14/2018 01:20 PM, Paul Fultz II wrote:
>> meta-packages that cover multiple components?
>
> You can just create a .pc file that adds each component in the requires.
That assumes that all components are wanted and are meant to be
all used together at once for linking. CMake's find_package
command is meant to find what's available. Project code then
links to some subset of the actual targets available. Maybe
we'd need a variable-only .pc file with a specific naming
convention for that.
> find_package(zlib CONF VERSION > 1.0)
find_package already has a "CONFIG" mode. The semantics of
pkgconf are different enough I don't think we should overload
the command. I'd rather have a separate find_pkgconf command.
Or maybe another name will be appropriate depending on the
semantics designed.
-Brad
More information about the cmake-developers
mailing list