From 9fc8b732737f139d3e466510d75668ab45578960 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 8 Mar 2016 21:02:53 +0100 Subject: sync with upstream --- project/cmake/modules/FindSSH.cmake | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 project/cmake/modules/FindSSH.cmake (limited to 'project/cmake/modules/FindSSH.cmake') diff --git a/project/cmake/modules/FindSSH.cmake b/project/cmake/modules/FindSSH.cmake new file mode 100644 index 0000000..60c3537 --- /dev/null +++ b/project/cmake/modules/FindSSH.cmake @@ -0,0 +1,21 @@ +# - Try to find libssh +# Once done this will define +# +# SSH_FOUND - system has libssh +# SSH_INCLUDE_DIRS - the libssh include directory +# SSH_LIBRARIES - The libssh libraries + +if(PKG_CONFIG_FOUND) + pkg_check_modules (SSH libssh) + list(APPEND SSH_INCLUDE_DIRS /usr/include) +else() + find_path(SSH_INCLUDE_DIRS libssh/libssh.h) + find_library(SSH_LIBRARIES ssh) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SSH DEFAULT_MSG SSH_INCLUDE_DIRS SSH_LIBRARIES) + +list(APPEND SSH_DEFINITIONS -DHAVE_LIBSSH=1) + +mark_as_advanced(SSH_INCLUDE_DIRS SSH_LIBRARIES SSH_DEFINITIONS) -- cgit v1.2.3