1 set(CMAKE_SYSTEM_NAME Windows)
2 set(CMAKE_TOOLCHAIN_PREFIX
3 ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32
5 find_program(CMAKE_AR ${CMAKE_TOOLCHAIN_PREFIX}-gcc-ar)
6 find_program(CMAKE_C_COMPILER ${CMAKE_TOOLCHAIN_PREFIX}-gcc)
7 find_program(CMAKE_CXX_COMPILER ${CMAKE_TOOLCHAIN_PREFIX}-g++)
8 find_program(CMAKE_RANLIB ${CMAKE_TOOLCHAIN_PREFIX}-gcc-ranlib)
9 find_program(CMAKE_RC_COMPILER ${CMAKE_TOOLCHAIN_PREFIX}-windres)
10 set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} -x assembler-with-cpp)
11 get_filename_component(CMAKE_FIND_ROOT_PATH "${CMAKE_C_COMPILER}" DIRECTORY)
12 get_filename_component(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}" DIRECTORY)
14 set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}/${CMAKE_TOOLCHAIN_PREFIX}")
16 set(CMAKE_INSTALL_PREFIX ${CMAKE_FIND_ROOT_PATH} CACHE PATH
17 "Install path prefix, prepended onto install directories."
20 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
21 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
22 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
23 set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
25 if(CMAKE_TOOLCHAIN_FILE)