Mercurial > hg > orthanc
comparison Resources/MinGW64Toolchain.cmake @ 580:d798274c1601
integration laaw->mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Sep 2013 17:39:45 +0200 |
parents | ec2c2411d4db |
children |
comparison
equal
deleted
inserted
replaced
563:c5f1986d9ddc | 580:d798274c1601 |
---|---|
1 # http://sourceforge.net/apps/trac/mingw-w64/wiki/GeneralUsageInstructions | |
2 | |
3 # the name of the target operating system | |
4 set(CMAKE_SYSTEM_NAME Windows) | |
5 | |
6 # Detect the prefix of the mingw-w64 compiler | |
7 execute_process( | |
8 COMMAND uname -p | |
9 OUTPUT_VARIABLE MINGW64_ARCHITECTURE | |
10 OUTPUT_STRIP_TRAILING_WHITESPACE | |
11 ) | |
12 | |
13 if (${MINGW64_ARCHITECTURE} STREQUAL "x86_64") | |
14 set(MINGW64_PREFIX "x86_64") | |
15 else() | |
16 set(MINGW64_PREFIX "i686") | |
17 endif() | |
18 | |
19 # which compilers to use for C and C++ | |
20 set(CMAKE_C_COMPILER ${MINGW64_PREFIX}-w64-mingw32-gcc) | |
21 set(CMAKE_CXX_COMPILER ${MINGW64_PREFIX}-w64-mingw32-g++) | |
22 set(CMAKE_RC_COMPILER ${MINGW64_PREFIX}-w64-mingw32-windres) | |
23 | |
24 # here is the target environment located | |
25 set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) | |
26 | |
27 # adjust the default behaviour of the FIND_XXX() commands: | |
28 # search headers and libraries in the target environment, search | |
29 # programs in the host environment | |
30 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | |
31 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | |
32 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |