From 252d26afb0aa6375e08ef95b754cccf60f31b6df Mon Sep 17 00:00:00 2001 From: Jon Keller Date: Mon, 8 Feb 2021 09:51:30 -0600 Subject: [PATCH] macOS: allow CMAKE_OSX_ARCHITECTURES to be arm64 --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 67b61712e..73711753a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,10 +253,12 @@ if(SFML_OS_MACOSX) endif() endif() - # only the default architecture (i.e. 64-bit) is supported - if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64") - message(FATAL_ERROR "Only 64-bit architecture is supported") - endif() + # only the default x86_64 or arm64 are supported + foreach (arch IN LISTS CMAKE_OSX_ARCHITECTURES) + if (NOT (arch STREQUAL "x86_64" OR arch STREQUAL "arm64")) + message(FATAL_ERROR "Invalid arch ${arch}") + endif() + endforeach() # configure Xcode templates set(XCODE_TEMPLATES_ARCH "\$(NATIVE_ARCH_ACTUAL)")