diff options
author | Brad King <brad.king@kitware.com> | 2020-06-09 12:53:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-06-09 12:53:06 (GMT) |
commit | cc1592d708b7190dffb47e2414608694550ae6c1 (patch) | |
tree | 6f1fdc4f7113b8818ba040cc212d2f40f760a67f /Modules/FindOpenSSL.cmake | |
parent | 675ddc4ccfb3214187ed90817b010cabaafee5fd (diff) | |
parent | 796b447373ea8b085a8e41903dacdf9cc27f171a (diff) | |
download | CMake-cc1592d708b7190dffb47e2414608694550ae6c1.zip CMake-cc1592d708b7190dffb47e2414608694550ae6c1.tar.gz CMake-cc1592d708b7190dffb47e2414608694550ae6c1.tar.bz2 |
Merge topic 'FindOpenSSL-3.0'
796b447373 FindOpenSSL: Fix OpenSSL 3.0.0 version extraction
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4860
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-rw-r--r-- | Modules/FindOpenSSL.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 8ddd78e..ee40696 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -444,11 +444,13 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h") # Since OpenSSL 3.0.0, the new version format is MAJOR.MINOR.PATCH and # a new OPENSSL_VERSION_STR macro contains exactly that file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" OPENSSL_VERSION_STR - REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\.([0-9])+\.([0-9])+\".*") - string(REGEX REPLACE "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+\.[0-9]+\.[0-9]+)\".*$" + REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*") + string(REGEX REPLACE "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*$" "\\1" OPENSSL_VERSION_STR "${OPENSSL_VERSION_STR}") set(OPENSSL_VERSION "${OPENSSL_VERSION_STR}") + + unset(OPENSSL_VERSION_STR) endif () endif () |