File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -415,6 +415,15 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
415
415
endif ()
416
416
417
417
set (OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR} .${OPENSSL_VERSION_MINOR} .${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING} " )
418
+ else ()
419
+ # Since OpenSSL 3.0.0, the new version format is MAJOR.MINOR.PATCH and
420
+ # a new OPENSSL_VERSION_STR macro contains exactly that
421
+ file (STRINGS "${OPENSSL_INCLUDE_DIR} /openssl/opensslv.h" OPENSSL_VERSION_STR
422
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\" ([0-9])+\. ([0-9])+\. ([0-9])+\" .*" )
423
+ string (REGEX REPLACE "^.*OPENSSL_VERSION_STR[\t ]+\" ([0-9]+\. [0-9]+\. [0-9]+)\" .*$"
424
+ "\\ 1" OPENSSL_VERSION_STR "${OPENSSL_VERSION_STR} " )
425
+
426
+ set (OPENSSL_VERSION "${OPENSSL_VERSION_STR} " )
418
427
endif ()
419
428
endif ()
420
429
You can’t perform that action at this time.
0 commit comments