From 35653e6bd56e589a0525c3012a16353420375a6f Mon Sep 17 00:00:00 2001 From: Juergen Kahrs Date: Fri, 8 Feb 2013 09:40:01 +0100 Subject: Added Toolchain files as examples for cross-compilation. --- cmake/Toolchain_mingw32.cmake | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cmake/Toolchain_mingw32.cmake (limited to 'cmake/Toolchain_mingw32.cmake') diff --git a/cmake/Toolchain_mingw32.cmake b/cmake/Toolchain_mingw32.cmake new file mode 100644 index 00000000..8f1d2fbd --- /dev/null +++ b/cmake/Toolchain_mingw32.cmake @@ -0,0 +1,23 @@ +# http://www.cmake.org/Wiki/CmakeMingw +# http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file + +# the name of the target operating system +SET(CMAKE_SYSTEM_NAME Windows) + +# which compilers to use for C and C++ +# Settings for Ubuntu 12.04.1 LTS +SET(CMAKE_C_COMPILER /usr/bin/i686-w64-mingw32-gcc) +SET(CMAKE_CXX_COMPILER /usr/bin/i686-w64-mingw32-g++) +SET(CMAKE_RC_COMPILER /usr/bin/i686-w64-mingw32-windres) + +# here is the target environment located +# Settings for Ubuntu 12.04.1 LTS +SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/i686-w64-mingw32/include) + +# 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) + -- cgit v1.2.3 From f4eb81006930f3d2fe944298b63bb546f0ee3e9f Mon Sep 17 00:00:00 2001 From: Juergen Kahrs Date: Mon, 18 Feb 2013 18:35:09 +0100 Subject: Testing, documentation, gettext and bison only on UNIX-based systems. --- cmake/Toolchain_mingw32.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/Toolchain_mingw32.cmake') diff --git a/cmake/Toolchain_mingw32.cmake b/cmake/Toolchain_mingw32.cmake index 8f1d2fbd..bb885f2f 100644 --- a/cmake/Toolchain_mingw32.cmake +++ b/cmake/Toolchain_mingw32.cmake @@ -12,7 +12,7 @@ SET(CMAKE_RC_COMPILER /usr/bin/i686-w64-mingw32-windres) # here is the target environment located # Settings for Ubuntu 12.04.1 LTS -SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/i686-w64-mingw32/include) +SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search -- cgit v1.2.3