summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenSSL.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-01-17 07:36:50 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-01-17 07:36:50 (GMT)
commit7053a00f237c5d510a9a64566139b76ce82dffdc (patch)
tree132a258e51a3aee26999c0d233d8eb4c671237c7 /Modules/FindOpenSSL.cmake
parent44ba7a3da8682316c8a53a266e06edceb038ef4d (diff)
downloadCMake-7053a00f237c5d510a9a64566139b76ce82dffdc.zip
CMake-7053a00f237c5d510a9a64566139b76ce82dffdc.tar.gz
CMake-7053a00f237c5d510a9a64566139b76ce82dffdc.tar.bz2
FindOpenSSL: only try to parse opensslv.h if it exists
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-rw-r--r--Modules/FindOpenSSL.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index bff5af6..5505282 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -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].*")