Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/Resources/CMake/OpenSslConfiguration.cmake Wed Apr 15 14:37:40 2020 +0200 +++ b/Resources/CMake/OpenSslConfiguration.cmake Wed Apr 15 14:45:52 2020 +0200 @@ -9,6 +9,26 @@ source_group(ThirdParty\\OpenSSL REGULAR_EXPRESSION ${OPENSSL_SOURCES_DIR}/.*) +elseif (CMAKE_CROSSCOMPILING AND + "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg") + + CHECK_INCLUDE_FILE_CXX(openssl/opensslv.h HAVE_OPENSSL_H) + if (NOT HAVE_OPENSSL_H) + message(FATAL_ERROR "Please install the libopenssl-dev package") + endif() + + CHECK_LIBRARY_EXISTS(crypto "OPENSSL_init" "" HAVE_OPENSSL_CRYPTO_LIB) + if (NOT HAVE_OPENSSL_CRYPTO_LIB) + message(FATAL_ERROR "Please install the libopenssl package") + endif() + + CHECK_LIBRARY_EXISTS(ssl "SSL_library_init" "" HAVE_OPENSSL_SSL_LIB) + if (NOT HAVE_OPENSSL_SSL_LIB) + message(FATAL_ERROR "Please install the libopenssl package") + endif() + + link_libraries(crypto ssl) + else() include(FindOpenSSL)