[CMake] pkg-config file format versus CMake packages

Paul Fultz II pfultz2 at yahoo.com
Fri May 25 19:52:43 EDT 2018


> On May 25, 2018, at 8:07 AM, Brad King <brad.king at kitware.com> wrote:
> 
> On 05/24/2018 07:39 PM, Paul Fultz II wrote:
>>> On May 24, 2018, at 8:07 AM, Brad King wrote:
>>> The `.pc` file format is too flat to lend itself well to representing
>>> all the information we need.  
>> 
>> What do you mean? What information can't be represented?
> 
> Try running CMake's ExportImport test and take a look at the
> files generated by export() and install(EXPORT).  If anyone
> can use `.pc` files as a package representation for everything
> that test does on all platforms then I'd like to see a proposal.

Yes, and what seems to be missing from pkg-config to represent that information is the ability to put a direct path to the library(instead of using the -l and -L flags), and support for a `Replaces` field. 

This is also the same shortcomings talked about in the CPS document as well. Resolving these shortcomings, will allow pkg-config to represent the same thing as CPS and cmake. What else is missing? 

The reason I say this is that extending pkg-config seems like it would help adoption rather then creating a completely new format. There is already a good portion of open source projects that already support pkg-config, so tweaking them to support more complicated scenarios seems easier than converting everything to a new format.

Paul


More information about the CMake mailing list