Merge topic 'improve-findgnutls'
b5719fb
FindGnuTLS: partly support version selection
This commit is contained in:
commit
8372bd98a9
|
@ -38,6 +38,7 @@ IF (NOT WIN32)
|
||||||
FIND_PACKAGE(PkgConfig QUIET)
|
FIND_PACKAGE(PkgConfig QUIET)
|
||||||
PKG_CHECK_MODULES(PC_GNUTLS QUIET gnutls)
|
PKG_CHECK_MODULES(PC_GNUTLS QUIET gnutls)
|
||||||
SET(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER})
|
SET(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER})
|
||||||
|
SET(GNUTLS_VERSION_STRING ${PC_GNUTLS_VERSION})
|
||||||
ENDIF (NOT WIN32)
|
ENDIF (NOT WIN32)
|
||||||
|
|
||||||
FIND_PATH(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
|
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
|
# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
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)
|
IF(GNUTLS_FOUND)
|
||||||
SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
|
SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
|
||||||
|
|
Loading…
Reference in New Issue