summaryrefslogtreecommitdiffstats
path: root/Toolchain-cygwin.cmake
blob: e4030a2ace1eca96e0cd4be45d10709655d3033c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
SET(CMAKE_SYSTEM_NAME CYGWIN)

# specify the cross compiler
SET(CMAKE_C_COMPILER /usr/bin/i686-pc-cygwin-gcc)
SET(CMAKE_CXX_COMPILER /usr/bin/i686-pc-cygwin-g++)

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /usr/i686-pc-cygwin/sys-root/usr)

# 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)