Look for openssl as well when gnutls-openssl wrapper is not found

This commit is contained in:
hax0kartik 2020-03-03 08:35:24 -08:00
parent ef3d7497d0
commit 60d3243e69
2 changed files with 4 additions and 2 deletions

View File

@ -363,6 +363,7 @@ if(GNUTLS_LIBRARIES)
set(HAVE_LIBGNUTLS 1)
find_library(GNUTLS_OPENSSL_LIBRARIES gnutls-openssl)
if(GNUTLS_OPENSSL_LIBRARIES)
set(HAVE_LIBGNUTLS_OPENSSL 1)
list(APPEND ZM_BIN_LIBS "${GNUTLS_OPENSSL_LIBRARIES}")
check_include_file("gnutls/openssl.h" HAVE_GNUTLS_OPENSSL_H)
endif(GNUTLS_OPENSSL_LIBRARIES)
@ -380,7 +381,7 @@ else(GNUTLS_LIBRARIES)
endif(GNUTLS_LIBRARIES)
# OpenSSL
if(NOT HAVE_LIBGNUTLS)
if(NOT HAVE_LIBGNUTLS AND NOT HAVE_LIBGNUTLS_OPENSSL)
find_package(OpenSSL)
if(OPENSSL_FOUND)
set(HAVE_LIBOPENSSL 1)
@ -393,7 +394,7 @@ if(NOT HAVE_LIBGNUTLS)
else(OPENSSL_FOUND)
set(optlibsnotfound "${optlibsnotfound} OpenSSL")
endif(OPENSSL_FOUND)
endif(NOT HAVE_LIBGNUTLS)
endif(NOT HAVE_LIBGNUTLS AND NOT HAVE_LIBGNUTLS_OPENSSL)
# pthread (using find_library and find_path)
find_library(PTHREAD_LIBRARIES pthread)

View File

@ -38,6 +38,7 @@
#cmakedefine HAVE_LIBGCRYPT 1
#cmakedefine HAVE_GCRYPT_H 1
#cmakedefine HAVE_LIBGNUTLS 1
#cmakedefine HAVE_LIBGNUTLS_OPENSSL 1
#cmakedefine HAVE_GNUTLS_OPENSSL_H 1
#cmakedefine HAVE_GNUTLS_GNUTLS_H 1
#cmakedefine HAVE_LIBMYSQLCLIENT 1