diff options
author | Brad King <brad.king@kitware.com> | 2022-06-03 13:43:42 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-06-03 13:43:53 (GMT) |
commit | 3715c154c84c9d55aa071ceac926520a9677a047 (patch) | |
tree | 419a9c5b0e2ade42f661f559ed85762061538228 /Modules | |
parent | 16ad65c5a2178aad43397f61e381d91853268a25 (diff) | |
parent | 4a6caef9d57f823cf0cfa9087ebe072d263d1b18 (diff) | |
download | CMake-3715c154c84c9d55aa071ceac926520a9677a047.zip CMake-3715c154c84c9d55aa071ceac926520a9677a047.tar.gz CMake-3715c154c84c9d55aa071ceac926520a9677a047.tar.bz2 |
Merge topic 'FindOpenSSL3_applink'
4a6caef9d5 FindOpenSSL: Set version variables for version >= 3.0.0
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7305
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindOpenSSL.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index d6a3a88..9278566 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -555,6 +555,14 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h") set(OPENSSL_VERSION "${OPENSSL_VERSION_STR}") + # Setting OPENSSL_VERSION_MAJOR OPENSSL_VERSION_MINOR and OPENSSL_VERSION_FIX + string(REGEX MATCHALL "([0-9])+" OPENSSL_VERSION_NUMBER "${OPENSSL_VERSION}") + list(POP_FRONT OPENSSL_VERSION_NUMBER + OPENSSL_VERSION_MAJOR + OPENSSL_VERSION_MINOR + OPENSSL_VERSION_FIX) + + unset(OPENSSL_VERSION_NUMBER) unset(OPENSSL_VERSION_STR) endif () endif () |