I am using the following cmake commands
# Search OpenSSL find_package(PkgConfig REQUIRED) pkg_search_module(OPENSSL REQUIRED openssl) if( OPENSSL_FOUND ) in
As of late 2016 this works for me:
In CMakeLists.txt:
find_package(openssl REQUIRED)
Run cmake like this:
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl .