comparison Resources/MinGW64Toolchain.cmake @ 762:45b16f67259c lua-scripting

integration mainline -> lua-scripting
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Apr 2014 16:47:21 +0200
parents ec2c2411d4db
children
comparison
equal deleted inserted replaced
409:63f707278fc8 762:45b16f67259c
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)