[CMake] anybody crosscompiling and using pkg_config ?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Jul 18 21:20:26 EDT 2008


On 2008-07-19 00:04+0200 Alexander Neundorf wrote:

> Hi,
>
> when crosscompiling, pkg_config shouldn't find packages for the host system,
> but for the target system.
> Attached is a patch against current cmake cvs which tries to do that by
> setting the env var PKG_CONFIG_LIBDIR to /usr/lib/pkgconfig
> and /usr/local/lib/pkgconfig inside the directories of CMAKE_FIND_ROOT_PATH.
>

Just an "overview" question about this proposed approach.  Is this
complication really necessary?  Why not just let the user who needs
cross-compilation simply set the pkg-config environment variables he needs
without messing with them inside CMake?

I set PKG_CONFIG_PATH a lot in my normal use of my various CMake-based build
systems, and it is no trouble at all.  Of course, this is for ordinary
compilation where I am looking for packages with non-standard install
prefixes, and not a cross-compilation situation, but I think the same
principle (keep CMake internals simple) should apply to cross-compilation.
Unless I am missing something, the cross-compiler user should be able to set
PKG_CONFIG_LIBDIR externally just like I currently set PKG_CONFIG_PATH
externally.

My $0.02.

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