diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-01-23 13:47:24 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-01-23 15:43:38 +0000 |
commit | ccf37e39054a9fc22f4afb6ef5e3841a5a67c227 (patch) | |
tree | 49566e68f141053d107818cc009a85366c9fbec9 /extcap | |
parent | 9681df7983d2808d74de093d86894cf818bd37b1 (diff) |
CMake: fix failure to locate zlib (and possibly libssh)
Include directories are no longer globally included, be explicit with
the required include directories or else function checks will fail.
Change-Id: I72d88f94854fcfe6529554f84e49d1dba696e9df
Fixes: v2.9.1rc0-436-ga3991874eb ("CMake: Replace PACKAGELIST magic")
Reviewed-on: https://code.wireshark.org/review/31693
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extcap/CMakeLists.txt b/extcap/CMakeLists.txt index 10a9057bac..d0ae9cbec3 100644 --- a/extcap/CMakeLists.txt +++ b/extcap/CMakeLists.txt @@ -12,8 +12,12 @@ if(EXTCAP_ANDROIDDUMP_LIBPCAP) endif() if(LIBSSH_FOUND) - SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LIBSSH_LIBRARIES}) - CHECK_FUNCTION_EXISTS(ssh_userauth_agent LIBSSH_USERAUTH_AGENT_FOUND) + include(CMakePushCheckState) + cmake_push_check_state() + set(CMAKE_REQUIRED_INCLUDES ${LIBSSH_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH_LIBRARIES}) + check_function_exists(ssh_userauth_agent LIBSSH_USERAUTH_AGENT_FOUND) + cmake_pop_check_state() if(LIBSSH_USERAUTH_AGENT_FOUND) set(HAVE_SSH_USERAUTH_AGENT 1) endif() |