From 98d02ebb1d94458e33267daee7141850dcb4ed22 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 1 Aug 2012 00:51:49 +0200 Subject: [PATCH] Updated MinGW cross-compilation documentation. --- CMake/README.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/CMake/README.txt b/CMake/README.txt index 96ac1905..9dbaee26 100644 --- a/CMake/README.txt +++ b/CMake/README.txt @@ -1,17 +1,16 @@ -This directory contains a collection of toolchain definitions for cross -compilation, currently limited to compiling Win32 binaries on Linux. - -The toolchain file naming scheme is as follows: - - host-system-compiler.cmake +This directory contains a collection of toolchain definitions for +cross-compiling for Windows using MinGW on various other systems. To use these files you add a special parameter when configuring the source tree: cmake -DCMAKE_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: