File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ # LIBSSH2_FOUND - system has the libssh2 library
2+ # LIBSSH2_INCLUDE_DIR - the libssh2 include directory
3+ # LIBSSH2_LIBRARY - the libssh2 library name
4+
5+ FIND_PATH (LIBSSH2_INCLUDE_DIR libssh2.h)
6+
7+ FIND_LIBRARY (LIBSSH2_LIBRARY NAMES ssh2 libssh2)
8+
9+ INCLUDE (FindPackageHandleStandardArgs)
10+ find_package_handle_standard_args(LibSSH2
11+ REQUIRED_VARS LIBSSH2_LIBRARY LIBSSH2_INCLUDE_DIR)
12+
13+ MARK_AS_ADVANCED (LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
Original file line number Diff line number Diff line change @@ -232,6 +232,13 @@ ENDIF()
232232# Optional external dependency: libssh2
233233IF (USE_SSH)
234234 FIND_PKGLIBRARIES(LIBSSH2 libssh2)
235+ IF (NOT LIBSSH2_FOUND)
236+ FIND_PACKAGE (LibSSH2)
237+ SET (LIBSSH2_INCLUDE_DIRS ${LIBSSH2_INCLUDE_DIR} )
238+ GET_FILENAME_COMPONENT (LIBSSH2_LIBRARY_DIRS "${LIBSSH2_LIBRARY} " DIRECTORY )
239+ SET (LIBSSH2_LIBRARIES ${LIBSSH2_LIBRARY} )
240+ SET (LIBSSH2_LDFLAGS "-lssh2" )
241+ ENDIF ()
235242ENDIF ()
236243IF (LIBSSH2_FOUND)
237244 SET (GIT_SSH 1)
You can’t perform that action at this time.
0 commit comments