C++ Logo

sg15

Advanced search

Re: [SG15] RFC: Requirements to consume a prebuilt library from arbitrary build systems

From: Matthew Woehlke <mwoehlke.floss_at_[hidden]>
Date: Mon, 15 Nov 2021 16:10:16 -0500
On 30/10/2021 07.02, Boris Kolpackov wrote:
> However, the pkg-config format allows arbitrary NAME=VALUE variables.

What is the plan for scaling this to multiple artifacts? One .pc per
artifact?

That's annoying for consumers. Do you have any plans to simplify
something like:

   find_package(Farm REQUIRED COMPONENTS Cow Pig OPTIONAL COMPONENTS Dog)

Right now it seems I have to write:

   pkg_config(REQUIRED Farm::Cow)
   pkg_config(REQUIRED Farm::Pig)
   pkg_config(OPTIONAL Farm::Dog)

...and hope there is enough information to not combine Cow and Pig from
incompatible versions. There's no way, though, as would be the case with
e.g. CPS or CMake-package-config, to restrict that Cow and Pig *must*
come from the same installation... or even the same project.

-- 
Matthew

Received on 2021-11-15 15:10:19