summaryrefslogtreecommitdiff
path: root/cmake/find_libssh.cmake
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-27 10:07:36 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-04-27 10:07:36 +0200
commit658a53c6aee000b8846695132e22bb914e6cf7dc (patch)
treeaedbcef11dff013190f3ac8dadfb1d71e990c594 /cmake/find_libssh.cmake
parentdc1fb59fd30e76571c9151900a84ac3c814ee167 (diff)
downloadcssh-658a53c6aee000b8846695132e22bb914e6cf7dc.tar.gz
cssh-658a53c6aee000b8846695132e22bb914e6cf7dc.tar.bz2
fixed probing for libssh (especially fixes OSX build issues)
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 )
+