[CMake] cmake integration

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Feb 9 13:41:23 EST 2007


On 2007-02-09 20:50+0300 Pavel Volkovitskiy wrote:

> [...]now with cmake:
> It seems the only thing i can always add is CMAKE_INSTALL_PREFIX, there is no 
> other standart variables for paths
> so one app will install plugins under /usr/lib/foo/, another will use 
> /usr/lib64/bla/
> one app will use /usr/man/ for man pages and another will use /usr/share/man, 
> etc
>
> so i tried to find useful variables which will work for most packages which 
> is uses cmake:
> ===================================
> CC=gcc CXX=g++  cmake \
>  -DCMAKE_C_FLAGS:STRING="-O2 -g" \
>  -DCMAKE_CXX_FLAGS:STRING="-O2 -g " \
>  -DCMAKE_EXE_LINKER_FLAGS:STRING="-g" \
>  -DCMAKE_MODULE_LINKER_FLAGS:STRING="-g" \
>  -DCMAKE_SHARED_LINKER_FLAGS:STRING="-g" \
>  -DCMAKE_INSTALL_PREFIX:PATH="/usr" \
>  -DUSE_KDE=YES \
>  /home/int/conary/builds/foo/foo-1.2.3/
> ===================================
> looks like all cmake based buildsystems should use these variables, am i 
> right?
> if something otheres useful variables, which i may add, exist?

Try http://www.cmake.org/Wiki/CMake_Useful_Variables.

>
> And it seems there is no equivalent for "--libdir" or other standart 
> configure parameters?

Correct.  CMake does not automatically set up the large variety of install
locations supported by the autotools-generated configure script.  Of course,
each software project built by CMake could choose to do something like that
(for example, PLplot has done this), but my impression is most projects
choose not to do this.  Therefore, I think the only standard CMake variables
you can rely on are given in the Wiki entry I pointed out above.

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