summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindSSH.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2018-08-30 00:42:04 +0200
committermanuel <manuel@mausz.at>2018-08-30 00:42:04 +0200
commit2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a (patch)
treecc9e1f8ea69eebca8416677b2470a5b3f11a850e /cmake/modules/FindSSH.cmake
parentb3d195f0188758a14875a5a2f270e4fd190a679f (diff)
downloadkodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.gz
kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.bz2
kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.zip
sync with upstream
Diffstat (limited to 'cmake/modules/FindSSH.cmake')
-rw-r--r--cmake/modules/FindSSH.cmake47
1 files changed, 0 insertions, 47 deletions
diff --git a/cmake/modules/FindSSH.cmake b/cmake/modules/FindSSH.cmake
deleted file mode 100644
index bf3837e..0000000
--- a/cmake/modules/FindSSH.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
1#.rst:
2# FindSSH
3# -------
4# Finds the SSH library
5#
6# This will will define the following variables::
7#
8# SSH_FOUND - system has SSH
9# SSH_INCLUDE_DIRS - the SSH include directory
10# SSH_LIBRARIES - the SSH libraries
11# SSH_DEFINITIONS - the SSH definitions
12#
13# and the following imported targets::
14#
15# SSH::SSH - The SSH library
16
17if(PKG_CONFIG_FOUND)
18 pkg_check_modules(PC_SSH libssh>=0.6 QUIET)
19endif()
20
21find_path(SSH_INCLUDE_DIR NAMES libssh/libssh.h
22 PATHS ${PC_SSH_INCLUDEDIR})
23find_library(SSH_LIBRARY NAMES ssh
24 PATHS ${PC_SSH_LIBDIR})
25
26set(SSH_VERSION ${PC_SSH_VERSION})
27
28include(FindPackageHandleStandardArgs)
29find_package_handle_standard_args(SSH
30 REQUIRED_VARS SSH_LIBRARY SSH_INCLUDE_DIR
31 VERSION_VAR SSH_VERSION)
32
33if(SSH_FOUND)
34 set(SSH_LIBRARIES ${SSH_LIBRARY})
35 set(SSH_INCLUDE_DIRS ${SSH_INCLUDE_DIR})
36 set(SSH_DEFINITIONS -DHAS_FILESYSTEM_SFTP=1)
37
38 if(NOT TARGET SSH::SSH)
39 add_library(SSH::SSH UNKNOWN IMPORTED)
40 set_target_properties(SSH::SSH PROPERTIES
41 IMPORTED_LOCATION "${SSH_LIBRARY}"
42 INTERFACE_INCLUDE_DIRECTORIES "${SSH_INCLUDE_DIR}"
43 INTERFACE_COMPILE_DEFINITIONS HAS_FILESYSTEM_SFTP=1)
44 endif()
45endif()
46
47mark_as_advanced(SSH_INCLUDE_DIR SSH_LIBRARY)