summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-06-02 01:52:19 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-06-02 01:52:29 +0200
commit41d41d2af9105351768cae1b39c7bce5540b8fe6 (patch)
tree55b91f31c34b8ddf0b6883e0ecbd0791eb852aad /CMakeLists.txt
parent9a2c96ae04917d9a5bfe182d5ac41f690d9c17d4 (diff)
downloadtdelibs-41d41d2af9105351768cae1b39c7bce5540b8fe6.tar.gz
tdelibs-41d41d2af9105351768cae1b39c7bce5540b8fe6.zip
Allow openssl detection without pkg-config file
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 2aa548763e7d1dd7a10427df45988a78b3e97b8b)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e8cfb9f8..c2bbfceaf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -903,7 +903,15 @@ endif( WITH_LIBBFD )
if( WITH_SSL )
pkg_search_module( SSL openssl )
if( NOT SSL_FOUND )
- message(FATAL_ERROR "\nSSL support are requested, but openssl is not found on your system" )
+ check_include_file( openssl/ssl.h HAVE_OPENSSL_H )
+ check_library_exists( ssl SSL_library_init "" HAVE_LIBSSL )
+ check_library_exists( crypto EVP_EncryptInit_ex "" HAVE_LIBCRYPTO )
+ if( HAVE_OPENSSL_H AND HAVE_LIBSSL AND HAVE_LIBCRYPTO )
+ set( SSL_FOUND 1 CACHE INTERNAL "" FORCE )
+ endif( HAVE_OPENSSL_H AND HAVE_LIBSSL AND HAVE_LIBCRYPTO )
+ endif( NOT SSL_FOUND )
+ if( NOT SSL_FOUND )
+ tde_message_fatal( "SSL support is requested, but openssl not found on your system" )
endif( NOT SSL_FOUND )
set( KSSL_HAVE_SSL 1 )
set( HAVE_SSL 1 )