From 8b410453938358b1e035fc01d55f3cd1f737b7b6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 15 May 2017 10:05:44 -0400 Subject: FindOpenSSL: Restore support for crypto-only result Since commit v3.8.0-rc1~132^2 (FindOpenSSL: Check that both CRYPTO and SSL libraries are present, 2017-01-03) we require both crypto and ssl libraries to be present. This makes sense because `OPENSSL_LIBRARIES` lists both and breaks when one is not found. However, prior to that fix we supported finding only the crypto library and using it through the imported target. Drop the requirement for ssl to restore support for using crypto alone. Later this module should be taught to support the `COMPONENTS` argument of `find_package`. Fixes: #16882 --- Modules/FindOpenSSL.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 609bc17..f7e9637 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -375,7 +375,7 @@ set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ) if (OPENSSL_VERSION) find_package_handle_standard_args(OpenSSL REQUIRED_VARS - OPENSSL_SSL_LIBRARY + #OPENSSL_SSL_LIBRARY # FIXME: require based on a component request? OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR VERSION_VAR @@ -385,7 +385,7 @@ if (OPENSSL_VERSION) ) else () find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR" - OPENSSL_SSL_LIBRARY + #OPENSSL_SSL_LIBRARY # FIXME: require based on a component request? OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR ) -- cgit v0.12