Only look for libjwt-gnutls and look for openssl only if gnutls is not found
This commit is contained in:
parent
cfcaf0fb81
commit
ef3d7497d0
|
@ -357,7 +357,30 @@ else(LIBJWT_FOUND)
|
||||||
set(optlibsnotfound "${optlibsnotfound} LIBJWT")
|
set(optlibsnotfound "${optlibsnotfound} LIBJWT")
|
||||||
endif(LIBJWT_FOUND)
|
endif(LIBJWT_FOUND)
|
||||||
|
|
||||||
|
# gnutls (using find_library and find_path)
|
||||||
|
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)
|
||||||
|
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/gnutls.h" HAVE_GNUTLS_GNUTLS_H)
|
||||||
|
set(optlibsfound "${optlibsfound} GnuTLS")
|
||||||
|
else(GNUTLS_LIBRARIES)
|
||||||
|
set(optlibsnotfound "${optlibsnotfound} GnuTLS")
|
||||||
|
endif(GNUTLS_LIBRARIES)
|
||||||
|
|
||||||
# OpenSSL
|
# OpenSSL
|
||||||
|
if(NOT HAVE_LIBGNUTLS)
|
||||||
find_package(OpenSSL)
|
find_package(OpenSSL)
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
set(HAVE_LIBOPENSSL 1)
|
set(HAVE_LIBOPENSSL 1)
|
||||||
|
@ -370,6 +393,7 @@ if(OPENSSL_FOUND)
|
||||||
else(OPENSSL_FOUND)
|
else(OPENSSL_FOUND)
|
||||||
set(optlibsnotfound "${optlibsnotfound} OpenSSL")
|
set(optlibsnotfound "${optlibsnotfound} OpenSSL")
|
||||||
endif(OPENSSL_FOUND)
|
endif(OPENSSL_FOUND)
|
||||||
|
endif(NOT HAVE_LIBGNUTLS)
|
||||||
|
|
||||||
# pthread (using find_library and find_path)
|
# pthread (using find_library and find_path)
|
||||||
find_library(PTHREAD_LIBRARIES pthread)
|
find_library(PTHREAD_LIBRARIES pthread)
|
||||||
|
@ -426,28 +450,6 @@ else(GCRYPT_LIBRARIES)
|
||||||
set(optlibsnotfound "${optlibsnotfound} GCrypt")
|
set(optlibsnotfound "${optlibsnotfound} GCrypt")
|
||||||
endif(GCRYPT_LIBRARIES)
|
endif(GCRYPT_LIBRARIES)
|
||||||
|
|
||||||
# gnutls (using find_library and find_path)
|
|
||||||
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)
|
|
||||||
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/gnutls.h" HAVE_GNUTLS_GNUTLS_H)
|
|
||||||
set(optlibsfound "${optlibsfound} GnuTLS")
|
|
||||||
else(GNUTLS_LIBRARIES)
|
|
||||||
set(optlibsnotfound "${optlibsnotfound} GnuTLS")
|
|
||||||
endif(GNUTLS_LIBRARIES)
|
|
||||||
|
|
||||||
# mysqlclient (using find_library and find_path)
|
# mysqlclient (using find_library and find_path)
|
||||||
find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
|
find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
|
||||||
if(MYSQLCLIENT_LIBRARIES)
|
if(MYSQLCLIENT_LIBRARIES)
|
||||||
|
|
|
@ -9,7 +9,7 @@ find_path(LIBJWT_INCLUDE_DIR
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(LIBJWT_LIBRARY
|
find_library(LIBJWT_LIBRARY
|
||||||
NAMES jwt libjwt liblibjwt jwt-gnutls libjwt-gnutls liblibjjwt-gnutls
|
NAMES jwt-gnutls libjwt-gnutls liblibjwt-gnutls
|
||||||
HINTS ${PC_LIBJWT_LIBDIR} ${PC_LIBJWT_LIBRARY_DIR}
|
HINTS ${PC_LIBJWT_LIBDIR} ${PC_LIBJWT_LIBRARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue