FindOpenSSL: only try to parse opensslv.h if it exists

This commit is contained in:
Rolf Eike Beer 2012-01-17 08:36:50 +01:00
parent 44ba7a3da8
commit 7053a00f23
1 changed files with 1 additions and 1 deletions

View File

@ -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].*")