Fix bitness detection for target platform

This commit is contained in:
Andrey Kamaev 2013-04-06 20:11:40 +04:00
parent 5cfb6a848e
commit d3083ecf6d

View File

@ -99,7 +99,11 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
endif() endif()
endif() endif()
if(MINGW64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*" OR CMAKE_GENERATOR MATCHES "Visual Studio.*Win64") if(MSVC64 OR MINGW64)
set(X86_64 1)
elseif(MSVC AND NOT CMAKE_CROSSCOMPILING)
set(X86 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(X86_64 1) set(X86_64 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
set(X86 1) set(X86 1)