diff options
Diffstat (limited to 'cmake/modules/FindSSH.cmake')
| -rw-r--r-- | cmake/modules/FindSSH.cmake | 47 |
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 | |||
| 17 | if(PKG_CONFIG_FOUND) | ||
| 18 | pkg_check_modules(PC_SSH libssh>=0.6 QUIET) | ||
| 19 | endif() | ||
| 20 | |||
| 21 | find_path(SSH_INCLUDE_DIR NAMES libssh/libssh.h | ||
| 22 | PATHS ${PC_SSH_INCLUDEDIR}) | ||
| 23 | find_library(SSH_LIBRARY NAMES ssh | ||
| 24 | PATHS ${PC_SSH_LIBDIR}) | ||
| 25 | |||
| 26 | set(SSH_VERSION ${PC_SSH_VERSION}) | ||
| 27 | |||
| 28 | include(FindPackageHandleStandardArgs) | ||
| 29 | find_package_handle_standard_args(SSH | ||
| 30 | REQUIRED_VARS SSH_LIBRARY SSH_INCLUDE_DIR | ||
| 31 | VERSION_VAR SSH_VERSION) | ||
| 32 | |||
| 33 | if(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() | ||
| 45 | endif() | ||
| 46 | |||
| 47 | mark_as_advanced(SSH_INCLUDE_DIR SSH_LIBRARY) | ||
