I am using the following cmake commands
# Search OpenSSL
find_package(PkgConfig REQUIRED)
pkg_search_module(OPENSSL REQUIRED openssl)
if( OPENSSL_FOUND )
in
Jonathan is right. The MacOS system open ssl is considered insecure. Here is what works for me
Install or upgrade openssl via brew
Add these to your CMakefile. Instead of hard coding you might choose to use a command line parameter or environment variable
include_directories(BEFORE /usr/local/Cellar/openssl/1.0.2p/include) find_library(OPENSSL_LIB ssl PATHS /usr/local/Cellar/openssl/1.0.2p/lib NO_DEFAULT_PATH) find_library(CRYPTO_LIB crypto PATHS /usr/local/Cellar/openssl/1.0.2p/lib NO_DEFAULT_PATH)
To find the OpenSSL directory use the following command:
brew list openssl