[CMake] Cross compilation from linux to windows using debian cross compilation i586-mingw32msvc-

Alexander Neundorf a.neundorf-work at gmx.net
Tue Sep 21 12:37:15 EDT 2010


On Tuesday 21 September 2010, Olivier Delannoy wrote:
> Hi,
> I have a bunch of  questions related to cross compilation using CMake.
>
> I am using CMake for a C project. The build process works very well
> for both linux and windows. I am now trying to sort out cross
> compilation from linux to windows. I gathered information from the
> CMake wiki and manage to get this working without any problem using
> http://mingw-cross-env.nongnu.org/. I just needed to add one variation
> compared to the documentation on the wiki. My toolchain file needed to
> contain an override for the ranlib util. The build process generated
> by CMake was trying to use the default one provided by the host
> system. Is there any reason why this is not mention at all on the
> wiki? Is it supposed to be guessed by CMake? Are there any other way
> to achieve that without explicitly referencing the ranlib tool in the
> toolchain file?

ranlib is searched in Modules/CMakeFindBinUtils.cmake.
I suggest that you add some debug output there to see what's going on, and 
post it here.

Alex


More information about the CMake mailing list