[CMake] 32 bits compilation on x64 platform - how to find system libraries

Olivier Pierard olivier.pierard at cenaero.be
Mon Dec 7 04:09:35 EST 2009


Mathieu Malaterre wrote:
> On Fri, Dec 4, 2009 at 4:39 PM, Olivier Pierard
> <olivier.pierard at cenaero.be> wrote:
>   
>> Dear all,
>>
>> In order to perform 32 bits compilation on 64 bits platform, how can I
>> tell that all find_libraries for which no path is specified to look in
>> /usr/lib instead of /usr/lib64 ?  Is there a configuration variable for
>> cmake platform or a default searching directories variable ?
>>
>>     
>
> This is called CMAKE_FIND_ROOT_PATH
>
> See for example:
>
> http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/Toolchain-gcc-m32.cmake?view=markup
>   
Thank you Mathieu.

Problem is that cmake appends '(/usr)/lib64' automatically to the
CMAKE_FIND_ROOT_PATH.  And since I want to switch between '/usr/lib' and
'/usr/lib64', setting the ROOT_PATH to '/usr' or '/' always ends up with
libraries found in /usr/lib64. Setting it to '/usr/lib' seems to be
ignored because there is nothing in /usr/lib/lib64.

Olivier
> You man need to read:
> http://www.cmake.org/Wiki/CMake_Cross_Compiling
>
> Cheers
>   


-- 
Olivier Pierard

CENAERO, Virtual Manufacturing Group

Bâtiment EOLE, 1er étage
Rue des Frères Wright, 29
B-6041 Gosselies
BELGIUM 

Tel: +32.(0)71.919374
Fax: +32.(0)71.919370

http://www.cenaero.be/

+-+-+- Disclaimer +-+-+-

http://www.cenaero.be/disclaimer



More information about the CMake mailing list