[CMake] Best practice for package using PKG-CONFIG

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Jun 30 14:49:50 EDT 2007


On 2007-06-30 08:23+0200 Olivier Delannoy wrote:

> Hello,
> I am new to the list and I hope the question as not been ask a tousand
> time already.
>
> I am writing a library which relies on several others and I would like
> to know which is the best practice for converting or integrating the
> information provided by the macro PKGCONFIG provided by the
> UsePkgConfig module.

UsePkgConfig.cmake is quite limited (it only delivers a tiny subset of what
is possible with pkg-config) and has some well-known bugs which are
difficult to fix without destroying backwards compatibility. The new
FindPkgConfig.cmake (scheduled for inclusion in 2.4.7 and available now as
part of release candidate RC-11 at http://www.cmake.org/files/v2.4/) is far
superior in my experience.

To Bill Hoffman with regard to a possible minor bug in RC-11: Bill, I cannot
find the deprecation message for UsePkgConfig.cmake that we discussed.  I
think such a deprecation message guiding the user toward FindPkgConfig.cmake
is worthwhile given the above problems with UsePkgConfig.cmake.

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); PLplot scientific plotting software
package (plplot.org); 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