From a5f63965c8240a09f8d11e6d175fcb6ed646cb29 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sun, 12 Sep 2010 21:03:47 +0000 Subject: [PATCH] [CMAKE] - Introduce support for the amd64 toolchain. Using it is as simple as adding -DARCH=amd64 to the cmake line (next to the toolchain file define). - Dedicated to Sylvain (Usurp) ;) svn path=/branches/cmake-bringup/; revision=48763 --- toolchain-mingw32.cmake | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/toolchain-mingw32.cmake b/toolchain-mingw32.cmake index a53a18591df..0395530bf43 100644 --- a/toolchain-mingw32.cmake +++ b/toolchain-mingw32.cmake @@ -1,12 +1,20 @@ +if(NOT ARCH) set(ARCH i386) +endif(NOT ARCH) # Choose the right MinGW prefix -if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows) +if(ARCH MATCHES i386) + +if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) set(MINGW_PREFIX "" CACHE STRING "MinGW Prefix") else() set(MINGW_PREFIX "mingw32-" CACHE STRING "MinGW Prefix") -endif() +endif(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) + +elseif(ARCH MATCHES amd64) +set(MINGW_PREFIX "x86_64-w64-mingw32-" CACHE STRING "MinGW Prefix") +endif(ARCH MATCHES i386) # the name of the target operating system SET(CMAKE_SYSTEM_NAME Windows) @@ -23,7 +31,8 @@ SET(CMAKE_RC_COMPILE_OBJECT " -i