From d3946f8fe5f6dbac2507c29a64fcc3779da1dbe7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 Dec 2024 21:34:03 +0100 Subject: [PATCH] Fix building crypto++ for x64 target on Apple silicon MacOS --- third_party/cryptopp/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/third_party/cryptopp/CMakeLists.txt b/third_party/cryptopp/CMakeLists.txt index 9c4100505..aa915e3fa 100644 --- a/third_party/cryptopp/CMakeLists.txt +++ b/third_party/cryptopp/CMakeLists.txt @@ -209,7 +209,10 @@ function(DumpMachine output pattern) set(${output} 0 PARENT_SCOPE) else () - if(CMAKE_SYSTEM_PROCESSOR MATCHES ${pattern}) + if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "" AND CMAKE_SYSTEM_PROCESSOR MATCHES ${pattern}) + set(${output} TRUE PARENT_SCOPE) + endif() + if(CMAKE_OSX_ARCHITECTURES MATCHES ${pattern}) set(${output} TRUE PARENT_SCOPE) endif() endif()