FindOpenSSL: Tolerate tabs in header while parsing version (#15765)

Tolerate tabs instead of spaces in the "# define" line.
This commit is contained in:
Wayne Stambaugh 2015-10-03 11:40:00 -04:00 committed by Brad King
parent 256bf8876a
commit 6b575dec8d
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ endfunction()
if (OPENSSL_INCLUDE_DIR)
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])+.*")
REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.