Fixed OPENSSL_ROOT_DIR for MacOS m1 and m2 setups

This commit is contained in:
eidheim 2022-09-30 11:59:55 +02:00
commit edf99c6426

View file

@ -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)