Updated MinGW cross-compilation documentation.

This commit is contained in:
Camilla Berglund 2012-08-01 00:51:49 +02:00
parent 302037d5b4
commit 98d02ebb1d

View File

@ -1,17 +1,16 @@
This directory contains a collection of toolchain definitions for cross This directory contains a collection of toolchain definitions for
compilation, currently limited to compiling Win32 binaries on Linux. cross-compiling for Windows using MinGW on various other systems.
The toolchain file naming scheme is as follows:
host-system-compiler.cmake
To use these files you add a special parameter when configuring the source tree: To use these files you add a special parameter when configuring the source tree:
cmake -DCMAKE_TOOLCHAIN_FILE=<toolchain-file> . cmake -DCMAKE_TOOLCHAIN_FILE=<toolchain-file> .
For example, to use the Debian GNU/Linux MinGW package, run CMake like this: The exact file to use depends on the prefix used by the MinGW binaries on your
system. You can usually see this in the /usr directory, i.e. the Ubuntu
MinGW-w64 packages have /usr/x86_64-w64-mingw32 for the 64-bit compilers, so the
correct invocation would be:
cmake -DCMAKE_TOOLCHAIN_FILE=CMake/i586-mingw32msvc.cmake . cmake -DCMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake .
For more details see this article: For more details see this article: