7deaee26fde33fe0a64da129ab961b42ecc43413
[reactos.git] / toolchain-mingw32.cmake
1
2 SET(ARCH i386)
3
4 # Choose the right MinGW prefix
5 if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
6 set(MINGW_PREFIX "")
7 else()
8 set(MINGW_PREFIX "mingw32-")
9 endif()
10
11 # the name of the target operating system
12 SET(CMAKE_SYSTEM_NAME Windows)
13 SET(CMAKE_SYSTEM_PROCESSOR i686)
14
15 # which compilers to use for C and C++
16 SET(CMAKE_C_COMPILER ${MINGW_PREFIX}gcc)
17 SET(CMAKE_CXX_COMPILER ${MINGW_PREFIX}g++)
18
19 SET(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
20
21 # adjust the default behaviour of the FIND_XXX() commands:
22 # search headers and libraries in the target environment, search
23 # programs in the host environment
24 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
25 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
26 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)