[CMake] Trouble with cross compiling from 64bit to 32bit with custom library path

Nathan Hüsken nathan.huesken at posteo.de
Mon Dec 19 06:58:36 EST 2011


Hi,

I have a project which I want to compile on a 64Bit Ubuntu host to a
32Bit executable. It uses boost. I have the 32bit boost libraries in
/boost32bit.
To compile for 32bit I add -m32 to the CFLAGS/CXXFLAGS.

Now when cmake searches for boost, it finds the boost libraries in
/usr/lib (which are 64bit).
So how can I:
- tell cmake to ignore 64bit libraries and always search only for 32bit
libraries?
- add /boost32bit to the cmake linker path?

Thanks!
Nathan


More information about the CMake mailing list