From 94adecb956eac74801bc035a0c403aaf44866d16 Mon Sep 17 00:00:00 2001 From: Gabor Kertesz Date: Tue, 2 Nov 2021 15:47:36 +0100 Subject: [PATCH] Do not enable SSE feature for ARM64 by default SSE is not available on ARM64. In order to enable win-arm64 widely, regardless of 3rd party projects' build systems, the most clean solution is simply not enable this flag by default on ARM64. Tested with Pillow python package. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d0f033..d14f058 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,11 @@ file(READ version.txt VERSION) project(imagequant C) -option(BUILD_WITH_SSE "Use SSE" ON) +if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ARM64) + option(BUILD_WITH_SSE "Use SSE" OFF) +else() + option(BUILD_WITH_SSE "Use SSE" ON) +endif() if(BUILD_WITH_SSE) add_definitions(-DUSE_SSE=1)