Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindLibSSH2.cmake44
1 files changed, 44 insertions, 0 deletions
diff --git a/cmake/Modules/FindLibSSH2.cmake b/cmake/Modules/FindLibSSH2.cmake
new file mode 100644
index 000000000..6347d60ea
--- /dev/null
+++ b/cmake/Modules/FindLibSSH2.cmake
@@ -0,0 +1,44 @@
+if (LIBSSH2_LIBRARIES AND LIBSSH2_INCLUDE_DIRS)
+ set(LIBSSH2_FOUND TRUE)
+else (LIBSSH2_LIBRARIES AND LIBSSH2_INCLUDE_DIRS)
+ find_path(LIBSSH2_INCLUDE_DIR
+ NAMES
+ libssh2.h
+ PATHS
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ ${CMAKE_INCLUDE_PATH}
+ ${CMAKE_INSTALL_PREFIX}/include
+ )
+
+ find_library(LIBSSH2_LIBRARY
+ NAMES
+ ssh2
+ libssh2
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ ${CMAKE_LIBRARY_PATH}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ )
+
+ if (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY)
+ set(LIBSSH2_FOUND TRUE)
+ endif (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY)
+
+ if (LIBSSH2_FOUND)
+ set(LIBSSH2_INCLUDE_DIRS
+ ${LIBSSH2_INCLUDE_DIR}
+ )
+
+ set(LIBSSH2_LIBRARIES
+ ${LIBSSH2_LIBRARIES}
+ ${LIBSSH2_LIBRARY}
+ )
+ endif (LIBSSH2_FOUND)
+endif (LIBSSH2_LIBRARIES AND LIBSSH2_INCLUDE_DIRS)
+