diff --git a/Release/cmake/cpprest_find_openssl.cmake b/Release/cmake/cpprest_find_openssl.cmake index 9333663607..e4dd29d692 100644 --- a/Release/cmake/cpprest_find_openssl.cmake +++ b/Release/cmake/cpprest_find_openssl.cmake @@ -35,6 +35,9 @@ function(cpprest_find_openssl) if(NOT DEFINED OPENSSL_ROOT_DIR) # Prefer a homebrew version of OpenSSL over the one in /usr/lib file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl*/*) + if (NOT DEFINED${OPENSSL_ROOT_DIR}) + file(GLOB OPENSSL_ROOT_DIR /opt/homebrew/Cellar/openssl*/*) + endif() # Prefer the latest (make the latest one first) list(REVERSE OPENSSL_ROOT_DIR) list(GET OPENSSL_ROOT_DIR 0 OPENSSL_ROOT_DIR)