4 # Choose the right MinGW prefix
5 if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
9 set(MINGW_PREFIX "mingw32-")
13 # the name of the target operating system
14 SET(CMAKE_SYSTEM_NAME Windows)
15 SET(CMAKE_SYSTEM_PROCESSOR i686)
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++)
21 SET(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
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)