comparison Resources/CMake/OpenSslConfiguration.cmake @ 3833:a3e38994d95a

compilation on mips qemu
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 15 Apr 2020 14:45:52 +0200
parents faa695f433d5
children
comparison
equal deleted inserted replaced
3832:ab9a0d1e0cc1 3833:a3e38994d95a
7 message(FATAL_ERROR "Unsupported version of OpenSSL: ${OPENSSL_STATIC_VERSION}") 7 message(FATAL_ERROR "Unsupported version of OpenSSL: ${OPENSSL_STATIC_VERSION}")
8 endif() 8 endif()
9 9
10 source_group(ThirdParty\\OpenSSL REGULAR_EXPRESSION ${OPENSSL_SOURCES_DIR}/.*) 10 source_group(ThirdParty\\OpenSSL REGULAR_EXPRESSION ${OPENSSL_SOURCES_DIR}/.*)
11 11
12 elseif (CMAKE_CROSSCOMPILING AND
13 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg")
14
15 CHECK_INCLUDE_FILE_CXX(openssl/opensslv.h HAVE_OPENSSL_H)
16 if (NOT HAVE_OPENSSL_H)
17 message(FATAL_ERROR "Please install the libopenssl-dev package")
18 endif()
19
20 CHECK_LIBRARY_EXISTS(crypto "OPENSSL_init" "" HAVE_OPENSSL_CRYPTO_LIB)
21 if (NOT HAVE_OPENSSL_CRYPTO_LIB)
22 message(FATAL_ERROR "Please install the libopenssl package")
23 endif()
24
25 CHECK_LIBRARY_EXISTS(ssl "SSL_library_init" "" HAVE_OPENSSL_SSL_LIB)
26 if (NOT HAVE_OPENSSL_SSL_LIB)
27 message(FATAL_ERROR "Please install the libopenssl package")
28 endif()
29
30 link_libraries(crypto ssl)
31
12 else() 32 else()
13 include(FindOpenSSL) 33 include(FindOpenSSL)
14 34
15 if (NOT ${OPENSSL_FOUND}) 35 if (NOT ${OPENSSL_FOUND})
16 message(FATAL_ERROR "Unable to find OpenSSL") 36 message(FATAL_ERROR "Unable to find OpenSSL")