diff options
author | Pascal Bach <pascal.bach@siemens.com> | 2014-06-10 13:15:40 +0200 |
---|---|---|
committer | Pascal Bach <pascal.bach@siemens.com> | 2014-06-10 13:44:02 +0200 |
commit | 569863a1385c38eb937662aa655db1c3fb0819fe (patch) | |
tree | 257419d25b8e4c5c886f3d5ae8bd5dbf937e1c7f /contrib | |
parent | 42be4e818ada259080811a87fb239fa81222f581 (diff) | |
download | thrift-569863a1385c38eb937662aa655db1c3fb0819fe.tar.gz |
Allow cross build for windows using mingw32
- Build the compiler using CMake for:
- Linux native gcc
- Windows using mingw32
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/mingw32-toolchain.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/mingw32-toolchain.cmake b/contrib/mingw32-toolchain.cmake new file mode 100644 index 000000000..3dfb1a51b --- /dev/null +++ b/contrib/mingw32-toolchain.cmake @@ -0,0 +1,19 @@ +# CMake mingw32 cross compile toolchain file
+
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
+SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
+SET(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|