Notes |
|
(0036586)
|
Cameron Garnham
|
2014-08-10 08:10
|
|
misleading title: perhaps edit to:
0015075: Wrong version found when overriding System OpenSSL with custom path (-DCMAKE_PREFIX_PATH=)
and description:
cmake should report the latest version of OpenSSL found on the prefix path.
however the pgk-config version overrides a custom path's version. |
|
|
(0036591)
|
Brad King
|
2014-08-11 10:18
|
|
So the right location of OpenSSL is found, but the wrong value of OPENSSL_VERSION is reported?
It appears that the computation for OPENSSL_VERSION trusts the pkg-config output regardless of where the headers and libraries were actually found:
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindOpenSSL.cmake;hb=v3.0.1#l278 [^]
Try this patch (untested):
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 340b417..a9295d2 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -275,9 +275,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])+.*") |
|
|
(0036896)
|
Brad King
|
2014-10-03 09:28
|
|
|
|
(0037666)
|
Brad King
|
2015-01-11 15:34
|
|
|
|
(0038833)
|
Robert Maynard
|
2015-06-01 08:38
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|