--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,18 +126,17 @@
 # MSVC cl doesn't support GNU inline assembly (but MSVC-compatible clang-cl does)
 if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
   if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|x86|x86_64|AMD64")
-    set(CPU_MMX ON)
     set(CPU_SSE ON)
     set(CPU_SSE2 ON)
     if(NOT MSVC) # also NOT clang-cl
       list(APPEND MLT_COMPILE_OPTIONS "-mmmx;-msse;-msse2")
     endif()
-  endif()
-  if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686" OR (WIN32 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86"))
-    set(CPU_X86_32 ON)
-  endif()
-  if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
-    set(CPU_X86_64 ON)
+    if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+      set(CPU_MMX ON)
+      set(CPU_X86_64 ON)
+    else()
+      set(CPU_X86_32 ON)
+    endif()
   endif()
 endif()
 
