|
ferencd@0
|
1 # - Try to find the GNU sasl library (gsasl)
|
|
ferencd@0
|
2 #
|
|
ferencd@0
|
3 # Once done this will define
|
|
ferencd@0
|
4 #
|
|
ferencd@0
|
5 # GNUTLS_FOUND - System has gnutls
|
|
ferencd@0
|
6 # GNUTLS_INCLUDE_DIR - The gnutls include directory
|
|
ferencd@0
|
7 # GNUTLS_LIBRARIES - The libraries needed to use gnutls
|
|
ferencd@0
|
8 # GNUTLS_DEFINITIONS - Compiler switches required for using gnutls
|
|
ferencd@0
|
9
|
|
ferencd@0
|
10 # Adapted from FindGnuTLS.cmake, which is:
|
|
ferencd@0
|
11 # Copyright 2009, Brad Hards, <bradh@kde.org>
|
|
ferencd@0
|
12 #
|
|
ferencd@0
|
13 # Changes are Copyright 2009, Michele Caini, <skypjack@gmail.com>
|
|
ferencd@0
|
14 #
|
|
ferencd@0
|
15 # Redistribution and use is allowed according to the terms of the BSD license.
|
|
ferencd@0
|
16 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
ferencd@0
|
17
|
|
ferencd@0
|
18
|
|
ferencd@0
|
19 IF (GSASL_INCLUDE_DIR AND GSASL_LIBRARIES)
|
|
ferencd@0
|
20 # in cache already
|
|
ferencd@0
|
21 SET(GSasl_FIND_QUIETLY TRUE)
|
|
ferencd@0
|
22 ENDIF (GSASL_INCLUDE_DIR AND GSASL_LIBRARIES)
|
|
ferencd@0
|
23
|
|
ferencd@0
|
24 IF (NOT WIN32)
|
|
ferencd@0
|
25 # use pkg-config to get the directories and then use these values
|
|
ferencd@0
|
26 # in the FIND_PATH() and FIND_LIBRARY() calls
|
|
ferencd@0
|
27 find_package(PkgConfig)
|
|
ferencd@0
|
28 pkg_check_modules(PC_GSASL libgsasl)
|
|
ferencd@0
|
29 SET(GSASL_DEFINITIONS ${PC_GSASL_CFLAGS_OTHER})
|
|
ferencd@0
|
30 ENDIF (NOT WIN32)
|
|
ferencd@0
|
31
|
|
ferencd@0
|
32 FIND_PATH(GSASL_INCLUDE_DIR gsasl.h
|
|
ferencd@0
|
33 HINTS
|
|
ferencd@0
|
34 ${PC_GSASL_INCLUDEDIR}
|
|
ferencd@0
|
35 ${PC_GSASL_INCLUDE_DIRS}
|
|
ferencd@0
|
36 PATH_SUFFIXES gsasl
|
|
ferencd@0
|
37 )
|
|
ferencd@0
|
38
|
|
ferencd@0
|
39 FIND_LIBRARY(GSASL_LIBRARIES NAMES gsasl libgsasl
|
|
ferencd@0
|
40 HINTS
|
|
ferencd@0
|
41 ${PC_GSASL_LIBDIR}
|
|
ferencd@0
|
42 ${PC_GSASL_LIBRARY_DIRS}
|
|
ferencd@0
|
43 )
|
|
ferencd@0
|
44
|
|
ferencd@0
|
45 INCLUDE(FindPackageHandleStandardArgs)
|
|
ferencd@0
|
46
|
|
ferencd@0
|
47 # handle the QUIETLY and REQUIRED arguments and set GSASL_FOUND to TRUE if
|
|
ferencd@0
|
48 # all listed variables are TRUE
|
|
ferencd@0
|
49 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSASL DEFAULT_MSG GSASL_LIBRARIES GSASL_INCLUDE_DIR)
|
|
ferencd@0
|
50
|
|
ferencd@0
|
51 MARK_AS_ADVANCED(GSASL_INCLUDE_DIR GSASL_LIBRARIES)
|