From bbe30e300c1618207f447927b0accedd51ab8769 Mon Sep 17 00:00:00 2001 From: Petter Uvesten Date: Sun, 1 Nov 2020 23:08:45 +0100 Subject: [PATCH] Enable building on Apple Silicon --- neo/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 78e8ff4e..b95fc3cb 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -230,6 +230,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") if(cpu STREQUAL "x86_64") add_compile_options(-arch x86_64 -mmacosx-version-min=10.9) set(ldflags "${ldflags} -arch x86_64 -mmacosx-version-min=10.9") + elseif(cpu STREQUAL "arm64") + add_compile_options(-arch arm64 -mmacosx-version-min=11.0) + set(ldflags "${ldflags} -arch arm64 -mmacosx-version-min=11.0") elseif(cpu STREQUAL "x86") CHECK_CXX_COMPILER_FLAG("-arch i386" cxx_has_arch_i386) if(cxx_has_arch_i386)