FindOpenSSL: Add component support
I had a problem a long time ago that
OPENSSL_LIBRARIES includes the
OPENSSL_FOUND does not check for it. On my Windows CI machine this condition is hit and cmake failures occur.
Maybe this Pull Req would be a more suitable fix for the long term. The behaviour is intended to be:
OPENSSL_CRYPTO_LIBRARYis found (old behaviour). This behaviour is now documented.
COMPONENTScan be sent in
find_package. These are
Cryptoto match the existing targets. If you send
OPENSSL_FOUNDwill only be
TRUEif all are available. This is new behaviour.
OpenSSL::Cryptoimported targets will only be created if
TRUE(existing behavior maintained).
OPENSSL_VERSIONis sent to
find_package_handle_standard_argswithout checking it exists as the function does that for us I believe. This is a change in behaviour, but should be backwards compatible.