Fwd: [CMake] Adding cross-compiler support to CMake ...

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Sep 8 17:12:07 EDT 2006


On 2006-09-08 22:33+0200 Alexander Neundorf wrote:

> [...]Once it is possible to do this, the cross-compiling abilities are really perfect.
> In KDE we do about one million configure checks, checking the availability of various functions, types and headers. And we use many extra libraries, which are found using FIND_PACKAGE().
>
> How should all that work when cross-compiling ?
> The FindFoo.cmake files as far as I can see cannot and are not written to find libraries in strange directories for cross-compiling.
> All the values could be set manually by hand, but this is not really doable for a project with so many checks.

Our project (PLplot) has lots of users who build it (and its many
dependencies) without root access.  So the ability to find headers,
libraries, executables, and pkg-config files in non-standard user-defined
locations was one of the first capabilities of CMake that I checked.  The
environment variables CMAKE_INCLUDE_PATH, CMAKE_LIBRARY_PATH, PATH, and
PKG_CONFIG_PATH satisfy the PLplot need for finding headers, etc. in
non-standard locations in a reasonably convenient way. The CMake
FindFoo.cmake files work honor those variables.  If aside from prefix you
were careful to stick to standard (for the non-local platform) install
locations for the headers, etc. required for cross compilation, then it
should be convenient to use the environment variable approach in that case
as well.

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 Yorick front-end to PLplot (yplot.sf.net); 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