mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-28 04:09:35 +03:00
FindOpenSSL: Support version 1.1.1 under QNX 7.0
QNX 7.0 allows parallel installation of OpenSSL 1.0.2 and OpenSSL 1.1.1. The 1.1.1 version has "1_1" appended to the include dir and library names.
This commit is contained in:
@@ -148,6 +148,19 @@ if(OPENSSL_USE_STATIC_LIBS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "QNX" AND
|
||||
CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL "7.0" AND CMAKE_SYSTEM_VERSION VERSION_LESS "7.1" AND
|
||||
OpenSSL_FIND_VERSION VERSION_GREATER_EQUAL "1.1" AND OpenSSL_FIND_VERSION VERSION_LESS "1.2")
|
||||
# QNX 7.0.x provides openssl 1.0.2 and 1.1.1 in parallel:
|
||||
# * openssl 1.0.2: libcrypto.so.2 and libssl.so.2, headers under usr/include/openssl
|
||||
# * openssl 1.1.1: libcrypto1_1.so.2.1 and libssl1_1.so.2.1, header under usr/include/openssl1_1
|
||||
# See http://www.qnx.com/developers/articles/rel_6726_0.html
|
||||
set(_OPENSSL_FIND_PATH_SUFFIX "openssl1_1")
|
||||
set(_OPENSSL_NAME_POSTFIX "1_1")
|
||||
else()
|
||||
set(_OPENSSL_FIND_PATH_SUFFIX "include")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
# http://www.slproweb.com/products/Win32OpenSSL.html
|
||||
set(_OPENSSL_ROOT_HINTS
|
||||
@@ -200,7 +213,7 @@ find_path(OPENSSL_INCLUDE_DIR
|
||||
${_OPENSSL_INCLUDEDIR}
|
||||
${_OPENSSL_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
${_OPENSSL_FIND_PATH_SUFFIX}
|
||||
)
|
||||
|
||||
if(WIN32 AND NOT CYGWIN)
|
||||
@@ -430,7 +443,7 @@ else()
|
||||
|
||||
find_library(OPENSSL_SSL_LIBRARY
|
||||
NAMES
|
||||
ssl
|
||||
ssl${_OPENSSL_NAME_POSTFIX}
|
||||
ssleay32
|
||||
ssleay32MD
|
||||
NAMES_PER_DIR
|
||||
@@ -444,7 +457,7 @@ else()
|
||||
|
||||
find_library(OPENSSL_CRYPTO_LIBRARY
|
||||
NAMES
|
||||
crypto
|
||||
crypto${_OPENSSL_NAME_POSTFIX}
|
||||
NAMES_PER_DIR
|
||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||
HINTS
|
||||
@@ -681,3 +694,6 @@ endif()
|
||||
if(OPENSSL_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openssl_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif()
|
||||
|
||||
unset(_OPENSSL_FIND_PATH_SUFFIX)
|
||||
unset(_OPENSSL_NAME_POSTFIX)
|
||||
|
||||
Reference in New Issue
Block a user