aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKevin Kane <kkane@microsoft.com>2020-12-10 10:30:54 -0800
committerAndreas Schneider <asn@cryptomilk.org>2020-12-10 19:38:59 +0100
commit3c33c3945523a9d07c541c77017ac2639305e13a (patch)
treef6a4dbc559086322514d72430773fb87ad886850 /CMakeLists.txt
parenta0e19239b8015f76fcc8ddfbdf496bd0f83acb21 (diff)
downloadlibssh-3c33c3945523a9d07c541c77017ac2639305e13a.tar.gz
libssh-3c33c3945523a9d07c541c77017ac2639305e13a.tar.xz
libssh-3c33c3945523a9d07c541c77017ac2639305e13a.zip
Provide OPENSSL_CRYPTO_LIBRARIES synonym for OPENSSL_CRYPTO_LIBRARY
FindOpenSSL.cmake usually defines this synonym, but it doesn't on CMake < 3.16 when building on Windows outside of Cygwin. Signed-off-by: Kevin Kane <kkane@microsoft.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39bc0471..db4657b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -59,7 +59,13 @@ elseif(WITH_MBEDTLS)
endif (NOT MBEDTLS_FOUND)
else (WITH_GCRYPT)
find_package(OpenSSL)
- if (NOT OPENSSL_FOUND)
+ if (OPENSSL_FOUND)
+ # On CMake < 3.16, OPENSSL_CRYPTO_LIBRARIES is usually a synonym for OPENSSL_CRYPTO_LIBRARY, but is not defined
+ # when building on Windows outside of Cygwin. We provide the synonym here, if FindOpenSSL didn't define it already.
+ if (NOT DEFINED OPENSSL_CRYPTO_LIBRARIES)
+ set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
+ endif (NOT DEFINED OPENSSL_CRYPTO_LIBRARIES)
+ else (OPENSSL_FOUND)
find_package(GCrypt)
if (NOT GCRYPT_FOUND)
find_package(MbedTLS)