diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fb68df94..b2c50ada4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -878,8 +878,9 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR CMAKE_GENERATOR_PLATFORM_LWR MATC list(APPEND ARCH_FLAGS -mno-unaligned-access) endif() endif() -elseif ((APPLE AND CMAKE_OSX_ARCHITECTURES AND ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "x86_64")) OR - (((APPLE AND NOT CMAKE_OSX_ARCHITECTURES) OR NOT APPLE) AND ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^(x86_64|i686|AMD64)$" OR "${CMAKE_GENERATOR_PLATFORM_LWR}" MATCHES "^(x86_64|i686|amd64|x64)$" ))) +elseif (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_GENERATOR_PLATFORM_LWR MATCHES "^(x86_64|i686|amd64|x64|win32)$" OR + (NOT CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_GENERATOR_PLATFORM_LWR AND + (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|i686|AMD64)$"))) message(STATUS "x86 detected") if (MSVC) # instruction set detection for MSVC only