summaryrefslogtreecommitdiff
path: root/cmake/toolchains
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-05-12 08:21:30 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-05-12 08:21:30 -0400
commit7a00574163029c0c2b649878c95d5acbd083564a (patch)
treec13cc5736025834df2874ed87ee8598070025ea6 /cmake/toolchains
parentb745315323de9f27538edac9453205ca70e6186e (diff)
Imported Upstream version 1.7.2+dfsg
Diffstat (limited to 'cmake/toolchains')
-rw-r--r--cmake/toolchains/Toolchain-mingw32.cmake36
-rw-r--r--cmake/toolchains/Toolchain-mingw64-x64.cmake37
-rw-r--r--cmake/toolchains/Toolchain-mingw64-x86.cmake36
3 files changed, 109 insertions, 0 deletions
diff --git a/cmake/toolchains/Toolchain-mingw32.cmake b/cmake/toolchains/Toolchain-mingw32.cmake
new file mode 100644
index 0000000..0f7ed9e
--- /dev/null
+++ b/cmake/toolchains/Toolchain-mingw32.cmake
@@ -0,0 +1,36 @@
+SET(MINGW32_ROOT "/usr/i686-pc-mingw32/sys-root/mingw")
+
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# specify the cross compiler
+SET(CMAKE_C_COMPILER /usr/bin/i686-pc-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER /usr/bin/i686-pc-mingw32-g++)
+
+# where is the target environment
+SET(CMAKE_FIND_ROOT_PATH "${MINGW32_ROOT}" /usr/local/i686-pc-mingw32)
+
+# search for programs in the build host directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+# for libraries and headers in the target directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# FindQt4.cmake queries qmake to get information,
+# which doesn't work when crosscompiling
+SET(QT_HEADERS_DIR ${CMAKE_FIND_ROOT_PATH}/include)
+SET(QT_LIBRARY_DIR ${CMAKE_FIND_ROOT_PATH}/lib)
+
+# set the resource compiler (RHBZ #652435)
+SET(CMAKE_RC_COMPILER /usr/bin/i686-pc-mingw32-windres)
+
+# override boost library suffix which defaults to -mgw
+SET(Boost_COMPILER -gcc45)
+
+# Since ICU is all strange and smart and stuff, let's do this
+SET(ICU_CONFIG_BIN_PATH "${MINGW32_ROOT}/bin/")
+SET(ICU_CONFIG_OPTS "--noverify")
+
+INCLUDE_DIRECTORIES("${MINGW32_ROOT}/include/glib-2.0")
+INCLUDE_DIRECTORIES("${MINGW32_ROOT}/lib/glib-2.0/include")
+
+SET(CROSS_COMPILE_MINGW32 TRUE)
diff --git a/cmake/toolchains/Toolchain-mingw64-x64.cmake b/cmake/toolchains/Toolchain-mingw64-x64.cmake
new file mode 100644
index 0000000..53a1bee
--- /dev/null
+++ b/cmake/toolchains/Toolchain-mingw64-x64.cmake
@@ -0,0 +1,37 @@
+SET(MINGW32_ROOT "/usr/x86_64-w64-mingw32/sys-root/mingw")
+
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# specify the cross compiler
+SET(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)
+
+# where is the target environment
+SET(CMAKE_FIND_ROOT_PATH "${MINGW32_ROOT}" /usr/local/x86_64-w64-mingw32)
+
+# search for programs in the build host directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+# for libraries and headers in the target directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# FindQt4.cmake queries qmake to get information,
+# which doesn't work when crosscompiling
+SET(QT_HEADERS_DIR ${CMAKE_FIND_ROOT_PATH}/include)
+SET(QT_LIBRARY_DIR ${CMAKE_FIND_ROOT_PATH}/lib)
+
+# set the resource compiler (RHBZ #652435)
+SET(CMAKE_RC_COMPILER /usr/bin/x86_64-w64-mingw32-windres)
+
+# override boost library suffix which defaults to -mgw
+SET(Boost_COMPILER -gcc45)
+
+# Since ICU is all strange and smart and stuff, let's do this
+SET(ICU_CONFIG_BIN_PATH "${MINGW32_ROOT}/bin/")
+SET(ICU_CONFIG_OPTS "--noverify")
+
+INCLUDE_DIRECTORIES("${MINGW32_ROOT}/include/glib-2.0")
+INCLUDE_DIRECTORIES("${MINGW32_ROOT}/lib/glib-2.0/include")
+
+SET(CROSS_COMPILE_MINGW32 TRUE)
+
diff --git a/cmake/toolchains/Toolchain-mingw64-x86.cmake b/cmake/toolchains/Toolchain-mingw64-x86.cmake
new file mode 100644
index 0000000..6c2ddbe
--- /dev/null
+++ b/cmake/toolchains/Toolchain-mingw64-x86.cmake
@@ -0,0 +1,36 @@
+SET(MINGW32_ROOT "/usr/i686-w64-mingw32/sys-root/mingw")
+
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# specify the cross compiler
+SET(CMAKE_C_COMPILER /usr/bin/i686-w64-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER /usr/bin/i686-w64-mingw32-g++)
+
+# where is the target environment
+SET(CMAKE_FIND_ROOT_PATH "${MINGW32_ROOT}" /usr/local/i686-w64-mingw32)
+
+# search for programs in the build host directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+# for libraries and headers in the target directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# FindQt4.cmake queries qmake to get information,
+# which doesn't work when crosscompiling
+SET(QT_HEADERS_DIR ${CMAKE_FIND_ROOT_PATH}/include)
+SET(QT_LIBRARY_DIR ${CMAKE_FIND_ROOT_PATH}/lib)
+
+# set the resource compiler (RHBZ #652435)
+SET(CMAKE_RC_COMPILER /usr/bin/i686-w64-mingw32-windres)
+
+# override boost library suffix which defaults to -mgw
+SET(Boost_COMPILER -gcc45)
+
+# Since ICU is all strange and smart and stuff, let's do this
+SET(ICU_CONFIG_BIN_PATH "${MINGW32_ROOT}/bin/")
+SET(ICU_CONFIG_OPTS "--noverify")
+
+INCLUDE_DIRECTORIES("${MINGW32_ROOT}/include/glib-2.0")
+INCLUDE_DIRECTORIES("${MINGW32_ROOT}/lib/glib-2.0/include")
+
+SET(CROSS_COMPILE_MINGW32 TRUE)