Change how cmake looks for gnutls and gnutls-openssl

This commit is contained in:
hax0kartik 2020-03-01 08:42:39 -08:00
parent 70ef3d0eba
commit cfcaf0fb81
1 changed files with 5 additions and 15 deletions

View File

@ -430,6 +430,11 @@ endif(GCRYPT_LIBRARIES)
find_library(GNUTLS_LIBRARIES gnutls)
if(GNUTLS_LIBRARIES)
set(HAVE_LIBGNUTLS 1)
find_library(GNUTLS_OPENSSL_LIBRARIES gnutls-openssl)
if(GNUTLS_OPENSSL_LIBRARIES)
list(APPEND ZM_BIN_LIBS "${GNUTLS_OPENSSL_LIBRARIES}")
check_include_file("gnutls/openssl.h" HAVE_GNUTLS_OPENSSL_H)
endif(GNUTLS_OPENSSL_LIBRARIES)
list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}")
find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h)
if(GNUTLS_INCLUDE_DIR)
@ -443,21 +448,6 @@ 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)