[CMake] looking for 2 features to help pkg-config pc files

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Mar 27 16:53:38 EDT 2018


On 2018-03-27 21:25+0300 Nikos Chantziaras wrote:

> Note that one downside to that is that people not using CMake cannot make use 
> of that.  They still need a pkgconfig file. So in a sense, pkgconfig is the 
> common denominator everybody can use, regardless of build system.

It is not an either-or proposition.  Both kinds of packages are
useful. The pkg-config package is useful for the (lowest)
common-denominator reason you state, but for those already using
CMake, a native CMake package is considerably more powerful (e.g., the
ability to use generator expressions based on packages imported from a
native CMake package).

For these reasons in the PLplot case I generate both pkg-config and
native packages.  The current implementation uses independent logic
for each kind of package, but to absolutely guarantee consistent
information for the two kinds of packages, it would be desireable to
move to an implementation that uses generator expressions to extract
the required compiler and linker data from a generated native package
and configure the pkg-config result directly from those data. So if
somebody here has already tried that approach or the alternative
approach of converting pkg-config packages to native packages, I would
like to hear about it.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list