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:
authorBrad Morgan <brad@dmgctrl.com>2013-05-07 22:26:33 +0400
committerBrad Morgan <brad@dmgctrl.com>2013-05-07 22:26:33 +0400
commit7369b3c3bf396e466d065f9921415fe2b9d69a7a (patch)
treec35c2f7d8acafb5771b06b14ef59564306b3ca3e /cmake
parent574b86b72294e4b0fd08281f4c19e013f0d9b137 (diff)
Added libssh2 cmake module
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)
+