summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-01-23 18:19:10 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-01-23 19:07:46 (GMT)
commitb5719fb7272707889030f990d8c6bf66f415c417 (patch)
treebf023a0f6fdeb8df14ae4fa774a988c197a7e390 /Modules
parent86c9604f98b2271401cf7a53c251be51af15278c (diff)
downloadCMake-b5719fb7272707889030f990d8c6bf66f415c417.zip
CMake-b5719fb7272707889030f990d8c6bf66f415c417.tar.gz
CMake-b5719fb7272707889030f990d8c6bf66f415c417.tar.bz2
FindGnuTLS: partly support version selection
For the Un*x systems where we use PkgConfig to find the library we can also use the version returned from there.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindGnuTLS.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindGnuTLS.cmake b/Modules/FindGnuTLS.cmake
index a437a1f..2e2bf8a 100644
--- a/Modules/FindGnuTLS.cmake
+++ b/Modules/FindGnuTLS.cmake
@@ -38,6 +38,7 @@ IF (NOT WIN32)
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_GNUTLS 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})