On 11/28/2011 05:58 PM, Kishore Jonnalagadda wrote:
I have recently moved to using 64bit Kubuntu Oneiric when supports
multiarch. I understand that building 32 bit from my 64 install is as
simple as adding the "-m32" option to gcc. Asking cmake to add that
flag is easy but i don't know how to ask cmake to only look for 32 bit
libraries in FindPackage() class. I have all the 32bit library (Qt)
dependencies installed and they are in /usr/lib/i386-linux-gnu. By
adding the "-m32" option compilation succeeds but as expected linking
fails complaining that i am trying to link to 64 bit libraries.
So, how do i ask cmake to look for 32bit libs?
I personally haven't found a good solution for this either.
What I currently do is the following
set(CMAKE_SYSTEM_PROCESSOR i386)
set(CMAKE_SYSTEM_LIBRARY_PATH /lib32 /usr/lib32 /usr/local/lib32)
set(FIND_LIBRARY_USE_LIB64_PATHS OFF)
set(CMAKE_IGNORE_PATH /lib /usr/lib /usr/local/lib)
Unfortunately the CMAKE_IGNORE_PATH is required. I created a bug about this.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake