[CMake] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

Vladimir Lebedev-Schmidthof vlebedev at envionsoftware.com
Tue Oct 20 08:51:11 EDT 2009


Hello Hendrik,

On Oct 20, 2009, at 15:56 PM, Hendrik Sattler wrote:
> > I tried. Setting CMAKE_SYSTEM_NAME to "Linux" does not seem to  
> affect
> > CMAKE_SYSTEM
>
> WHERE are you try to set this? Setting this in a CMakeLists.txt file
> will not work. Did you read the wiki page[1] about cross-compiling?
> Check that CMAKE_CROSSCOMPILING is set to true.
>
> HS
>
> [1]: http://www.cmake.org/Wiki/CMake_Cross_Compiling
>
>
>
Thanks, I've read that before posting my first post :-)

I tried having toochain.cmake file in the same dir as CMakeLists.txt

using
cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake .

does not seem to even read that file. I tried to state full path, move  
the file away, no luck.

So I just include()d my toolchain.cmake in CMakeLists.txt.

And, yes, CMAKE_CROSSCOMPILING is set to false.

I tried to set it to true but it has no effect.

By the way, on Linux host CMAKE_TOOLCHAIN_FILE variable doesn't have  
effect as well.

--
Sincerely Yours,
Vladimir Lebedev-Schmidthof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091020/29330677/attachment.htm>


More information about the CMake mailing list