summaryrefslogtreecommitdiff
path: root/cmake/find_libssh.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/find_libssh.cmake')
-rw-r--r--cmake/find_libssh.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/find_libssh.cmake b/cmake/find_libssh.cmake
new file mode 100644
index 0000000..30cf41f
--- /dev/null
+++ b/cmake/find_libssh.cmake
@@ -0,0 +1,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 )
+