1 set(CMAKE_SYSTEM_NAME Windows)
2 set(CMAKE_TOOLCHAIN_PREFIX
3 ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32
5 find_program(CMAKE_C_COMPILER NAMES
6 ${CMAKE_TOOLCHAIN_PREFIX}-clang
7 ${CMAKE_TOOLCHAIN_PREFIX}-gcc
9 find_program(CMAKE_CXX_COMPILER NAMES
10 ${CMAKE_TOOLCHAIN_PREFIX}-clang++
11 ${CMAKE_TOOLCHAIN_PREFIX}-g++
13 find_program(CMAKE_AR NAMES
14 ${CMAKE_TOOLCHAIN_PREFIX}-llvm-ar
15 ${CMAKE_TOOLCHAIN_PREFIX}-gcc-ar
17 find_program(CMAKE_RANLIB NAMES
18 ${CMAKE_TOOLCHAIN_PREFIX}-llvm-ranlib
19 ${CMAKE_TOOLCHAIN_PREFIX}-gcc-ranlib
21 find_program(CMAKE_RC_COMPILER ${CMAKE_TOOLCHAIN_PREFIX}-windres)
22 set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} -x assembler-with-cpp)
23 get_filename_component(CMAKE_FIND_ROOT_PATH "${CMAKE_C_COMPILER}" DIRECTORY)
24 get_filename_component(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}" DIRECTORY)
26 set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}/${CMAKE_TOOLCHAIN_PREFIX}")
28 set(CMAKE_INSTALL_PREFIX ${CMAKE_FIND_ROOT_PATH} CACHE PATH
29 "Install path prefix, prepended onto install directories."
32 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
33 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
34 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
35 set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
37 if(CMAKE_TOOLCHAIN_FILE)