diff options
author | Joakim Karlsson <oakimk@gmail.com> | 2018-10-14 20:37:16 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-10-15 14:41:33 +0000 |
commit | 189a7357e799c0faa5e36d4966f485b9b6d394e3 (patch) | |
tree | 137cf1d8b86e597808f503e9eb595d23e8788b34 /cmake | |
parent | 016f3665d5066ee8bc65065cd1ff5484fd7af367 (diff) |
cmake: fix version check for c-ares and gnuTLS
Version requirement was already in place but not executed
Change-Id: I9a163fae2b428cecd309f932f5ef87dd8db8c516
Reviewed-on: https://code.wireshark.org/review/30210
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindCARES.cmake | 10 | ||||
-rw-r--r-- | cmake/modules/FindGNUTLS.cmake | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/cmake/modules/FindCARES.cmake b/cmake/modules/FindCARES.cmake index 2725a61d44..526f70ee9f 100644 --- a/cmake/modules/FindCARES.cmake +++ b/cmake/modules/FindCARES.cmake @@ -17,6 +17,16 @@ ENDIF (CARES_INCLUDE_DIRS) INCLUDE(FindWSWinLibs) FindWSWinLibs("c-ares-.*" "CARES_HINTS") +if (NOT WIN32) + find_package(PkgConfig) + + if( CARES_OPTIONS ) + pkg_search_module( CARES c-ares>=${CARES_OPTIONS} ) + else() + pkg_search_module( CARES c-ares ) + endif() +endif() + FIND_PATH(CARES_INCLUDE_DIR ares.h HINTS "${CARES_HINTS}/include" ) SET(CARES_NAMES cares libcares-2) diff --git a/cmake/modules/FindGNUTLS.cmake b/cmake/modules/FindGNUTLS.cmake index 0487341285..b347eada98 100644 --- a/cmake/modules/FindGNUTLS.cmake +++ b/cmake/modules/FindGNUTLS.cmake @@ -19,7 +19,12 @@ FindWSWinLibs("gnutls-.*" "GNUTLS_HINTS") if (NOT WIN32) find_package(PkgConfig) - pkg_search_module(GNUTLS gnutls) + + if( GNUTLS_OPTIONS ) + pkg_search_module( GNUTLS gnutls>=${GNUTLS_OPTIONS} ) + else() + pkg_search_module( GNUTLS gnutls ) + endif() endif() # sources include gnutls/gnutls.h, look for that location instead of gnutls.h. |