3695f4d9cced18ba06287a6fc966156c2ef31431
[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 set(MKDIR_ARG "")
8 else()
9 set(MINGW_PREFIX "mingw32-")
10 set(MKDIR_ARG "-p")
11 endif()
12
13 # the name of the target operating system
14 SET(CMAKE_SYSTEM_NAME Windows)
15 SET(CMAKE_SYSTEM_PROCESSOR i686)
16
17 # which compilers to use for C and C++
18 SET(CMAKE_C_COMPILER ${MINGW_PREFIX}gcc)
19 SET(CMAKE_CXX_COMPILER ${MINGW_PREFIX}g++)
20
21 SET(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
22
23 # adjust the default behaviour of the FIND_XXX() commands:
24 # search headers and libraries in the target environment, search
25 # programs in the host environment
26 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
27 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
28 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)