--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -407,7 +407,7 @@
   # set up the assembler flags and include the source files
   foreach(ARCH ${ASM_ARCHS_AVAILABLE})
     string(REGEX MATCH "${ARCH}" ASM_ARCH "${FULL_C_FLAGS}")
-    if( ASM_ARCH STREQUAL "armv7" )
+    if(( ASM_ARCH STREQUAL "armv7" ) OR ( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7"))
       message(STATUS "---- Adding ASM files") # we always use ATT syntax
       message(STATUS "-- Detected armv7 architecture; enabling ASM")
       # setup architecture specific assembler flags
