Look for gnutls-openssl and gnutls separately

pull/2844/head
hax0kartik 2020-03-01 08:33:56 -08:00
parent 182120343f
commit 70ef3d0eba
1 changed files with 16 additions and 6 deletions

View File

@ -427,11 +427,7 @@ else(GCRYPT_LIBRARIES)
endif(GCRYPT_LIBRARIES)
# gnutls (using find_library and find_path)
find_library(GNUTLS_LIBRARIES gnutls-openssl)
if(NOT GNUTLS_LIBRARIES)
find_library(GNUTLS_LIBRARIES gnutls)
endif(NOT GNUTLS_LIBRARIES)
find_library(GNUTLS_LIBRARIES gnutls)
if(GNUTLS_LIBRARIES)
set(HAVE_LIBGNUTLS 1)
list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}")
@ -441,13 +437,27 @@ if(GNUTLS_LIBRARIES)
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
endif(GNUTLS_INCLUDE_DIR)
mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR)
check_include_file("gnutls/openssl.h" HAVE_GNUTLS_OPENSSL_H)
check_include_file("gnutls/gnutls.h" HAVE_GNUTLS_GNUTLS_H)
set(optlibsfound "${optlibsfound} GnuTLS")
else(GNUTLS_LIBRARIES)
set(optlibsnotfound "${optlibsnotfound} GnuTLS")
endif(GNUTLS_LIBRARIES)
find_library(GNUTLS_OPENSSL_LIBRARIES gnutls-openssl)
if(GNUTLS_OPENSSL_LIBRARIES)
list(APPEND ZM_BIN_LIBS "${GNUTLS_OPENSSL_LIBRARIES}")
find_path(GNUTLS_INCLUDE_DIR gnutls/openssl.h)
if(GNUTLS_INCLUDE_DIR)
include_directories("${GNUTLS_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
endif(GNUTLS_INCLUDE_DIR)
mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR)
check_include_file("gnutls/openssl.h" HAVE_GNUTLS_OPENSSL_H)
set(optlibsfound "${optlibsfound} GnuTLS_OEPNSSL")
else(GNUTLS_OPENSSL_LIBRARIES)
set(optlibsnotfound "${optlibsnotfound} GnuTLS_OPENSSL")
endif(GNUTLS_OPENSSL_LIBRARIES)
# mysqlclient (using find_library and find_path)
find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
if(MYSQLCLIENT_LIBRARIES)