From d44b2cf875f87443a985b22ffe5a97fa7e61886c Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Wed, 22 Jun 2022 22:18:54 -0400 Subject: [PATCH] pick sane defaults for OPENSSL_ROOT_DIR on ARM macOS --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 815763f981..511d5fd17d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,11 @@ set(ENABLE_MULTIVERSION_PROTOCOL_TEST FALSE CACHE BOOL "Enable nodeos multiversi # add defaults for openssl if(APPLE AND UNIX AND "${OPENSSL_ROOT_DIR}" STREQUAL "") - set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl@3;/usr/local/opt/openssl@1.1") + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") + set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/openssl@3;/opt/homebrew/opt/openssl@1.1") + else() + set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl@3;/usr/local/opt/openssl@1.1") + endif() endif() # fc also adds these definitions to its public interface. once fc becomes the sole importer of openssl, this should be removed add_definitions(-DOPENSSL_API_COMPAT=0x10100000L -DOPENSSL_NO_DEPRECATED)