ferencd@0: # - Try to find the GNU sasl library (gsasl) ferencd@0: # ferencd@0: # Once done this will define ferencd@0: # ferencd@0: # GNUTLS_FOUND - System has gnutls ferencd@0: # GNUTLS_INCLUDE_DIR - The gnutls include directory ferencd@0: # GNUTLS_LIBRARIES - The libraries needed to use gnutls ferencd@0: # GNUTLS_DEFINITIONS - Compiler switches required for using gnutls ferencd@0: ferencd@0: # Adapted from FindGnuTLS.cmake, which is: ferencd@0: # Copyright 2009, Brad Hards, ferencd@0: # ferencd@0: # Changes are Copyright 2009, Michele Caini, ferencd@0: # ferencd@0: # Redistribution and use is allowed according to the terms of the BSD license. ferencd@0: # For details see the accompanying COPYING-CMAKE-SCRIPTS file. ferencd@0: ferencd@0: ferencd@0: IF (GSASL_INCLUDE_DIR AND GSASL_LIBRARIES) ferencd@0: # in cache already ferencd@0: SET(GSasl_FIND_QUIETLY TRUE) ferencd@0: ENDIF (GSASL_INCLUDE_DIR AND GSASL_LIBRARIES) ferencd@0: ferencd@0: IF (NOT WIN32) ferencd@0: # use pkg-config to get the directories and then use these values ferencd@0: # in the FIND_PATH() and FIND_LIBRARY() calls ferencd@0: find_package(PkgConfig) ferencd@0: pkg_check_modules(PC_GSASL libgsasl) ferencd@0: SET(GSASL_DEFINITIONS ${PC_GSASL_CFLAGS_OTHER}) ferencd@0: ENDIF (NOT WIN32) ferencd@0: ferencd@0: FIND_PATH(GSASL_INCLUDE_DIR gsasl.h ferencd@0: HINTS ferencd@0: ${PC_GSASL_INCLUDEDIR} ferencd@0: ${PC_GSASL_INCLUDE_DIRS} ferencd@0: PATH_SUFFIXES gsasl ferencd@0: ) ferencd@0: ferencd@0: FIND_LIBRARY(GSASL_LIBRARIES NAMES gsasl libgsasl ferencd@0: HINTS ferencd@0: ${PC_GSASL_LIBDIR} ferencd@0: ${PC_GSASL_LIBRARY_DIRS} ferencd@0: ) ferencd@0: ferencd@0: INCLUDE(FindPackageHandleStandardArgs) ferencd@0: ferencd@0: # handle the QUIETLY and REQUIRED arguments and set GSASL_FOUND to TRUE if ferencd@0: # all listed variables are TRUE ferencd@0: FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSASL DEFAULT_MSG GSASL_LIBRARIES GSASL_INCLUDE_DIR) ferencd@0: ferencd@0: MARK_AS_ADVANCED(GSASL_INCLUDE_DIR GSASL_LIBRARIES)