FindOpenSSL: only try to parse opensslv.h if it exists
This commit is contained in:
parent
44ba7a3da8
commit
7053a00f23
|
@ -218,7 +218,7 @@ ENDIF(WIN32 AND NOT CYGWIN)
|
|||
if (OPENSSL_INCLUDE_DIR)
|
||||
if (_OPENSSL_VERSION)
|
||||
set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
|
||||
else (_OPENSSL_VERSION)
|
||||
elseif(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-9][0-9][0-9][0-9][0-9][0-9].*")
|
||||
|
||||
|
|
Loading…
Reference in New Issue