[CMake] cmake integration

Pavel Volkovitskiy int at mtx.ru
Fri Feb 9 15:19:59 EST 2007


Alan W. Irwin wrote:
> 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.
Yeah, i take all this variables from that wiki page
i'm wondering why cmake doesn't have such standart things

-- 
Pavel


More information about the CMake mailing list