summaryrefslogtreecommitdiff
path: root/cmake/modules/FindGNUTLS.cmake
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2009-09-09 13:20:33 +0000
committerJörg Mayer <jmayer@loplof.de>2009-09-09 13:20:33 +0000
commitca6b1e2b2142c7727bca82540c14d2a9c41e1a05 (patch)
tree5f35b5d74741be36415415d8d68acdd479e5c606 /cmake/modules/FindGNUTLS.cmake
parenta65f72e8f045ec9c17848c6508c9ccd27e2e91f4 (diff)
downloadwireshark-ca6b1e2b2142c7727bca82540c14d2a9c41e1a05.tar.gz
CMAKE: Get most of of missing *build* pieces into place
svn path=/trunk/; revision=29819
Diffstat (limited to 'cmake/modules/FindGNUTLS.cmake')
-rw-r--r--cmake/modules/FindGNUTLS.cmake35
1 files changed, 35 insertions, 0 deletions
diff --git a/cmake/modules/FindGNUTLS.cmake b/cmake/modules/FindGNUTLS.cmake
new file mode 100644
index 0000000000..37558aaf2b
--- /dev/null
+++ b/cmake/modules/FindGNUTLS.cmake
@@ -0,0 +1,35 @@
+# - Find gnutls
+# Find the native GNUTLS includes and library
+#
+# GNUTLS_INCLUDE_DIRS - where to find gnutls.h, etc.
+# GNUTLS_LIBRARIES - List of libraries when using gnutls.
+# GNUTLS_FOUND - True if gnutls found.
+
+
+IF (GNUTLS_INCLUDE_DIRS)
+ # Already in cache, be silent
+ SET(GNUTLS_FIND_QUIETLY TRUE)
+ENDIF (GNUTLS_INCLUDE_DIRS)
+
+FIND_PATH(GNUTLS_INCLUDE_DIR
+ NAMES
+ gnutls.h
+ gnutls/gnutls.h
+# PATHS
+)
+
+SET(GNUTLS_NAMES gnutls)
+FIND_LIBRARY(GNUTLS_LIBRARY NAMES ${GNUTLS_NAMES} )
+
+# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNUTLS DEFAULT_MSG GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
+
+IF(GNUTLS_FOUND)
+ SET( GNUTLS_LIBRARIES ${GNUTLS_LIBRARY} )
+ELSE(GNUTLS_FOUND)
+ SET( GNUTLS_LIBRARIES )
+ENDIF(GNUTLS_FOUND)
+
+MARK_AS_ADVANCED( GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIRS )