[sword-svn] r2634 - trunk/cmake/toolchains

greg.hellings at crosswire.org greg.hellings at crosswire.org
Thu Jul 7 12:28:34 MST 2011


Author: greg.hellings
Date: 2011-07-07 12:28:34 -0700 (Thu, 07 Jul 2011)
New Revision: 2634

Added:
   trunk/cmake/toolchains/Toolchain-mingw32.cmake
Log:
Toolchain file for building Mingw32 on Fedora

Added: trunk/cmake/toolchains/Toolchain-mingw32.cmake
===================================================================
--- trunk/cmake/toolchains/Toolchain-mingw32.cmake	                        (rev 0)
+++ trunk/cmake/toolchains/Toolchain-mingw32.cmake	2011-07-07 19:28:34 UTC (rev 2634)
@@ -0,0 +1,25 @@
+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 /usr/i686-pc-mingw32/sys-root/mingw /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)




More information about the sword-cvs mailing list