summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindSSH.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'project/cmake/modules/FindSSH.cmake')
-rw-r--r--project/cmake/modules/FindSSH.cmake21
1 files changed, 21 insertions, 0 deletions
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 @@
1# - Try to find libssh
2# Once done this will define
3#
4# SSH_FOUND - system has libssh
5# SSH_INCLUDE_DIRS - the libssh include directory
6# SSH_LIBRARIES - The libssh libraries
7
8if(PKG_CONFIG_FOUND)
9 pkg_check_modules (SSH libssh)
10 list(APPEND SSH_INCLUDE_DIRS /usr/include)
11else()
12 find_path(SSH_INCLUDE_DIRS libssh/libssh.h)
13 find_library(SSH_LIBRARIES ssh)
14endif()
15
16include(FindPackageHandleStandardArgs)
17find_package_handle_standard_args(SSH DEFAULT_MSG SSH_INCLUDE_DIRS SSH_LIBRARIES)
18
19list(APPEND SSH_DEFINITIONS -DHAVE_LIBSSH=1)
20
21mark_as_advanced(SSH_INCLUDE_DIRS SSH_LIBRARIES SSH_DEFINITIONS)