title: cmake - osx/mac - openssl brew
body: <p>I am using the following cmake commands</p>
  <pre><code># Search OpenSSL
  find_package(PkgConfig REQUIRED)
  pkg_search_module(OPENSSL REQUIRED openssl)
  
  if( OPENSSL_FOUND )
  
      include_directories(${OPENSSL_INCLUDE_DIRS})
      message(STATUS &quot;Using OpenSSL ${OPENSSL_VERSION}&quot;)
  else()
      # Error; with REQUIRED, pkg_search_module() will throw an error by it's own
  endif()
  </code></pre>
  <p>it works on Linux and on Mac, but on Mac it uses the osx-shipped libssl - which throws a a lot of deprecation warnings e.g. <code>'SSL_library_init' is deprecated: first deprecated in OS X 10.7&quot;</code></p>
  <p>using <code>brew</code> I already installed a newer - openssl-offical - libssl - how can I tell the <code>pkg_search_module</code> in cmake to find and use the brew version?</p>