From edf99c6426ae5fd950f51df4910fef6fec15986f Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 30 Sep 2022 11:59:55 +0200 Subject: [PATCH] Fixed OPENSSL_ROOT_DIR for MacOS m1 and m2 setups --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45e22e3..f7b6c83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,11 @@ if(WIN32) endif() if(APPLE) - set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl") + if(EXISTS /usr/local/opt/openssl) + set(OPENSSL_ROOT_DIR /usr/local/opt/openssl) + elseif(EXISTS /opt/homebrew/opt/openssl) + set(OPENSSL_ROOT_DIR /opt/homebrew/opt/openssl) + endif() endif() if(USE_OPENSSL) find_package(OpenSSL)