diff --git a/CMakeLists.txt b/CMakeLists.txt index 74caa4287..6fb68df94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -850,8 +850,9 @@ endif() set(ARCH_FLAGS "") -if ((APPLE AND CMAKE_OSX_ARCHITECTURES AND ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm64")) OR - (((APPLE AND NOT CMAKE_OSX_ARCHITECTURES) OR NOT APPLE) AND (("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm") OR ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64") OR ("${CMAKE_GENERATOR_PLATFORM_LWR}" MATCHES "arm64")))) +if (CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR CMAKE_GENERATOR_PLATFORM_LWR MATCHES "arm64" OR + (NOT CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_GENERATOR_PLATFORM_LWR AND + (CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64"))) message(STATUS "ARM detected") if (MSVC) add_compile_definitions(__ARM_NEON)