I am using the following cmake commands
# Search OpenSSL find_package(PkgConfig REQUIRED) pkg_search_module(OPENSSL REQUIRED openssl) if( OPENSSL_FOUND ) in
ok got it working :)
brew upgrade openssl brew link --force openssl pkg-config --modversion openssl #1.0.2
removed the cmake build folder and rerun the cmake .. and the above macro now finds the 1.0.2 libssl :)
cmake ..