1# 2# Toolchain for crosscompiling Qt4 application for Windows on ArchLinux. 3# 4# Minimal dependencies: 5# 6# mingw32-gcc 7# mingw32-qt 8# 9 10# Target system name 11set(CMAKE_SYSTEM_NAME Windows) 12 13# Compilers and utilities 14set(CMAKE_C_COMPILER i486-mingw32-gcc) 15set(CMAKE_CXX_COMPILER i486-mingw32-g++) 16set(CMAKE_RC_COMPILER i486-mingw32-windres) 17set(QT_QMAKE_EXECUTABLE i486-mingw32-qmake) 18 19# Croscompiler path 20set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} 21 /usr/i486-mingw32) 22 23# Find executables in root path, libraries and includes are in crosscompiler 24# path 25set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 26set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 27set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 28 29# FindQt4.cmake asks native QMake for variables, which surely cannot work when 30# crosscompiling. 31set(MINGW_PREFIX /usr/i486-mingw32) 32set(QT_LIBRARY_DIR ${MINGW_PREFIX}/lib) 33set(QT_MKSPECS_DIR ${MINGW_PREFIX}/mkspecs) 34 35# Modules 36set(QT_INCLUDE_DIR ${MINGW_PREFIX}/include) 37set(QT_QTCORE_INCLUDE_DIR ${MINGW_PREFIX}/include/QtCore) 38set(QT_QTGUI_INCLUDE_DIR ${MINGW_PREFIX}/include/QtGui) 39set(QT_QTNETWORK_INCLUDE_DIR ${MINGW_PREFIX}/include/QtNetwork) 40set(QT_QTWEBKIT_INCLUDE_DIR ${MINGW_PREFIX}/include/QtWebKit) 41set(QT_QTSQL_INCLUDE_DIR ${MINGW_PREFIX}/include/QtSql) 42set(QT_QTXML_INCLUDE_DIR ${MINGW_PREFIX}/include/QtXml) 43set(QT_PHONON_INCLUDE_DIR ${MINGW_PREFIX}/include/phonon) 44 45# Directories where to search for DLLs 46set(DLL_SEARCH_PATH 47 ${MINGW_PREFIX}/lib 48 ${MINGW_PREFIX}/bin 49 ${MINGW_PREFIX}/bin/qt-plugins/plugins 50) 51