summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenSSL.cmake
diff options
context:
space:
mode:
authorAku Kotkavuo <aku.kotkavuo@gmail.com>2015-01-09 22:40:20 (GMT)
committerBrad King <brad.king@kitware.com>2015-01-11 20:32:55 (GMT)
commit99b13820715ff3b98c2c0cb114b38620b6da4466 (patch)
treeed9933fdb762d38d9b2fd061118edb356a5f2d93 /Modules/FindOpenSSL.cmake
parent4aa9c64511adb6e3aa1b686d07f8cbdf92dedbab (diff)
downloadCMake-99b13820715ff3b98c2c0cb114b38620b6da4466.zip
CMake-99b13820715ff3b98c2c0cb114b38620b6da4466.tar.gz
CMake-99b13820715ff3b98c2c0cb114b38620b6da4466.tar.bz2
FindOpenSSL: Always extract version from detected header (#15075)
Do not use the _OPENSSL_VERSION computed by pkg-config because the user may change OPENSSL_INCLUDE_DIR.
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-rw-r--r--Modules/FindOpenSSL.cmake4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index b2722a6..bfbe01f 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -283,9 +283,7 @@ function(from_hex HEX DEC)
endfunction()
if (OPENSSL_INCLUDE_DIR)
- if (_OPENSSL_VERSION)
- set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
- elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
+ 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])+.*")