Fix warnings about hashed authentication not being available when using gnutls. Also set cmake_policy(SET CMP0054 NEW) to quiet warnings
This commit is contained in:
parent
210d380029
commit
2d5d87839f
|
@ -3,6 +3,7 @@
|
|||
# For more information and installation, see the INSTALL file
|
||||
#
|
||||
cmake_minimum_required (VERSION 2.8.7)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
project (zoneminder)
|
||||
file (STRINGS "version" zoneminder_VERSION)
|
||||
# make API version a minor of ZM version
|
||||
|
@ -738,6 +739,7 @@ if(HAVE_OPENSSL_MD5_H)
|
|||
"unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md)" "NULL" "openssl/md5.h"
|
||||
HAVE_MD5_OPENSSL)
|
||||
endif(HAVE_OPENSSL_MD5_H)
|
||||
|
||||
if(HAVE_GNUTLS_GNUTLS_H)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
|
||||
|
@ -746,13 +748,17 @@ if(HAVE_GNUTLS_GNUTLS_H)
|
|||
"int gnutls_fingerprint (gnutls_digest_algorithm_t algo, const gnutls_datum_t * data, void *result, size_t * result_size)" "0" "stdlib.h;gnutls/gnutls.h"
|
||||
HAVE_DECL_GNUTLS_FINGERPRINT)
|
||||
endif(HAVE_GNUTLS_GNUTLS_H)
|
||||
|
||||
if(HAVE_MD5_OPENSSL)
|
||||
set(HAVE_DECL_MD5 1)
|
||||
else(HAVE_MD5_OPENSSL)
|
||||
message(AUTHOR_WARNING
|
||||
"ZoneMinder requires a working MD5 function for hashed authenication but
|
||||
none were found - hashed authenication will not be available")
|
||||
endif(HAVE_MD5_OPENSSL)
|
||||
|
||||
if((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT))
|
||||
message(AUTHOR_WARNING
|
||||
"ZoneMinder requires a working MD5 function for hashed authentication but
|
||||
none were found - hashed authentication will not be available")
|
||||
endif((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT))
|
||||
|
||||
# Dirty fix for zm_user only using openssl's md5 if gnutls and gcrypt are not available.
|
||||
# This needs to be fixed in zm_user.[h,cpp] but such fix will also require changes to configure.ac
|
||||
if(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL)
|
||||
|
|
Loading…
Reference in New Issue