summaryrefslogtreecommitdiffstats
path: root/Modules/FindGnuTLS.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-01-25 16:18:29 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-01-25 16:18:29 (GMT)
commit8372bd98a9d5df29a483e8b43266ed928cba9ebe (patch)
treee7363000f6543efd362a49bf2260a6b7934ff088 /Modules/FindGnuTLS.cmake
parent825b9dde3d391169ad0546b4458f1d3e1bc88756 (diff)
parentb5719fb7272707889030f990d8c6bf66f415c417 (diff)
downloadCMake-8372bd98a9d5df29a483e8b43266ed928cba9ebe.zip
CMake-8372bd98a9d5df29a483e8b43266ed928cba9ebe.tar.gz
CMake-8372bd98a9d5df29a483e8b43266ed928cba9ebe.tar.bz2
Merge topic 'improve-findgnutls'
b5719fb FindGnuTLS: partly support version selection
Diffstat (limited to 'Modules/FindGnuTLS.cmake')
-rw-r--r--Modules/FindGnuTLS.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindGnuTLS.cmake b/Modules/FindGnuTLS.cmake
index e69a16b..02f2964 100644
--- a/Modules/FindGnuTLS.cmake
+++ b/Modules/FindGnuTLS.cmake
@@ -38,6 +38,7 @@ IF (NOT WIN32)
FIND_PACKAGE(PkgConfig QUIET)
PKG_CHECK_MODULES(PC_GNUTLS QUIET gnutls)
SET(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER})
+ SET(GNUTLS_VERSION_STRING ${PC_GNUTLS_VERSION})
ENDIF (NOT WIN32)
FIND_PATH(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
@@ -57,7 +58,9 @@ MARK_AS_ADVANCED(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS DEFAULT_MSG GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS
+ REQUIRED_VARS GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR
+ VERSION_VAR GNUTLS_VERSION_STRING)
IF(GNUTLS_FOUND)
SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})