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)