summaryrefslogtreecommitdiff
path: root/cmake/find_libssh.cmake
blob: 30cf41fa4d333d1d40dc42877d74424cf0d17c07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

MACRO( FIND_LIBSSH )
  find_path(libssh_INCLUDE_PATH NAMES libssh/libssh.h)
  find_library(libssh_LIBRARY NAMES ssh)
  if(libssh_INCLUDE_PATH AND libssh_LIBRARY)
    set(libssh_FOUND TRUE)
  endif(libssh_INCLUDE_PATH AND libssh_LIBRARY)
  if(libssh_FOUND)
    if(NOT libssh_FIND_QUIETLY)
      message(STATUS "Found libssh: ${libssh_LIBRARY}")
      message(STATUS "libssh include: ${libssh_INCLUDE_PATH}")
      message(STATUS "libssh library: ${libssh_LIBRARY}")
    endif(NOT libssh_FIND_QUIETLY)
  else(libssh_FOUND)
    if(libssh_FIND_REQUIRED)
      message(FATAL_ERROR "Could not find libssh library.")
    endif(libssh_FIND_REQUIRED)
  endif(libssh_FOUND)

ENDMACRO( FIND_LIBSSH )