forked from fundies/game
/
mingw32.toolchain
31 lines (26 loc) · 1.14 KB
/
mingw32.toolchain
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set (CMAKE_SYSTEM_NAME Windows)
set (CMAKE_SYSTEM_PROCESSOR x86_64)
set (CMAKE_CROSSCOMPILING TRUE)
# specify the cross compiler
set (CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
set (CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH /mingw64/)
set(CMAKE_PREFIX_PATH /mingw64)
SET(CMAKE_SYSTEM_INCLUDE_PATH /mingw64/include)
SET(CMAKE_SYSTEM_LIBRARY_PATH /mingw64/lib)
SET(CMAKE_SYSTEM_PROGRAM_PATH /mingw64/bin)
# search for programs in the build host directories
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
# set the resource compiler (RHBZ #652435)
set (CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
set (CMAKE_MC_COMPILER x86_64-w64-mingw32-windmc)
set (PKG_CONFIG_EXECUTABLE x86_64-w64-mingw32-pkg-config)
# These are needed for compiling lapack (RHBZ #753906)
set (CMAKE_Fortran_COMPILER x86_64-w64-mingw32-gfortran)
set (CMAKE_AR:FILEPATH x86_64-w64-mingw32-ar)
set (CMAKE_RANLIB:FILEPATH x86_64-w64-mingw32-ranlib)