summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenSSL.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-01-17 18:02:31 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-01-17 18:07:04 (GMT)
commitbb2b264b5ed76428319a428949a54ba76f71004d (patch)
treef7cb97ab8af9424241613b861aa15aeeb3f5394b /Modules/FindOpenSSL.cmake
parent7053a00f237c5d510a9a64566139b76ce82dffdc (diff)
downloadCMake-bb2b264b5ed76428319a428949a54ba76f71004d.zip
CMake-bb2b264b5ed76428319a428949a54ba76f71004d.tar.gz
CMake-bb2b264b5ed76428319a428949a54ba76f71004d.tar.bz2
FindOpenSSL: also parse version number define with uppercase letters
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-rw-r--r--Modules/FindOpenSSL.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 5505282..0750592 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -220,7 +220,7 @@ if (OPENSSL_INCLUDE_DIR)
set(OPENSSL_VERSION "${_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].*")
+ REGEX "^#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.
@@ -229,7 +229,7 @@ if (OPENSSL_INCLUDE_DIR)
# indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
# on.
- string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]).*$"
+ string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)