Merge topic 'FindOpenSSL-use-header-version'

99b13820 FindOpenSSL: Always extract version from detected header (#15075)
This commit is contained in:
Brad King 2015-01-12 08:57:42 -05:00 committed by CMake Topic Stage
commit 63412a85e0
1 changed files with 1 additions and 3 deletions

View File

@ -283,9 +283,7 @@ function(from_hex HEX DEC)
endfunction()
if (OPENSSL_INCLUDE_DIR)
if (_OPENSSL_VERSION)
set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")