diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6d1b8ab..6e06119 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -94,12 +94,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
     if(WIN32)
+      if (CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|x86|x86_64|AMD64)")
 #This is neeeded to prevent warnings such as:
 #mingw The ABI for passing parameters with 16-byte alignment has changed in GCC 4.6
 #if you compile for i686.
 #but the downside is that the compiled binaries might not work with some old CPU's.
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")
+      endif()
     endif(WIN32)
     set(CMAKE_CXX_FLAGS_DEBUG "-ggdb3")
     set(CMAKE_C_FLAGS_DEBUG "-ggdb3")
@@ -112,12 +114,14 @@ else()
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
        if(WIN32)
+         if (CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|x86|x86_64|AMD64)")
 #This is neeeded to prevent warnings such as:
 #mingw The ABI for passing parameters with 16-byte alignment has changed in GCC 4.6
 #if you compile for i686.
 #but the downside is that the compiled binaries might not work with some old CPU's.
           set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx")
           set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")
+         endif()
       endif(WIN32)
       set(CMAKE_CXX_FLAGS_DEBUG "-ggdb3")
       set(CMAKE_C_FLAGS_DEBUG "-ggdb3")
