blob: bf4a366df3fbe0c0ce7a8b9db2bb3a8b7c550547 (
plain)
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
32
33
34
35
|
# This is a CMake toolchain file so we can run Mingw64 to build a Windows64 binaries.
# http://vtk.org/Wiki/CMake_Cross_Compiling
# usage
# cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain-mingw64.cmake ../
set( CMAKE_SYSTEM_NAME Windows )
set( CMAKE_SYSTEM_PROCESSOR x86_64 )
#-----<configuration>-----------------------------------------------
# configure only the lines within this <configure> block, typically
set( TC_PATH /usr/bin )
set( CROSS_COMPILE x86_64-w64-mingw32- )
# specify the cross compiler
set( CMAKE_C_COMPILER ${TC_PATH}/${CROSS_COMPILE}gcc )
set( CMAKE_CXX_COMPILER ${TC_PATH}/${CROSS_COMPILE}g++ )
set( CMAKE_RC_COMPILER ${TC_PATH}/${CROSS_COMPILE}windres )
# where is the target environment
set( CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 )
#-----</configuration>-----------------------------------------------
# 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 )
|