From 93a86005d4f968785e446a585364784ebe3660a4 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..af314b4e8 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(NOT APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES ${pattern}) + set(${output} TRUE PARENT_SCOPE) + endif() + if(APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES ${pattern}) set(${output} TRUE PARENT_SCOPE) endif() endif()