From 14c28715d8489936e06461850a8dd117e0f4911b Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 5 Apr 2020 13:35:21 -0400 Subject: [PATCH] Fix warnings about hashed authentication not being available when using gnutls. Also set cmake_policy(SET CMP0054 NEW) to quiet warnings --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65fa4ba67..9694407a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 @@ -772,12 +773,14 @@ 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)