| 1 |
# the name of the target operating system |
| 2 |
SET(CMAKE_SYSTEM_NAME Windows) |
| 3 |
|
| 4 |
IF (NOT TOOLCHAIN) |
| 5 |
SET(TOOLCHAIN "i586-mingw32msvc-") |
| 6 |
ENDIF() |
| 7 |
|
| 8 |
# which compilers to use for C and C++ |
| 9 |
SET(CMAKE_C_COMPILER ${TOOLCHAIN}gcc) |
| 10 |
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN}g++) |
| 11 |
|
| 12 |
# which rc compiler to use |
| 13 |
SET(CMAKE_RC_COMPILER ${TOOLCHAIN}windres) |
| 14 |
|
| 15 |
# here is the target environment located |
| 16 |
# the directories specified here should contain two directories, |
| 17 |
# 'include' for the headers, 'lib' for dlls and .a files |
| 18 |
# For instance, the mingw32 headers can be installed at: |
| 19 |
# /usr/i586-mingw32msvc/ |
| 20 |
SET(CMAKE_FIND_ROOT_PATH /build/mingw32 /build/tmw-libs ) |
| 21 |
|
| 22 |
# adjust the default behaviour of the FIND_XXX() commands: |
| 23 |
# search headers and libraries in the target environment, search |
| 24 |
# programs in the host environment |
| 25 |
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
| 26 |
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
| 27 |
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |