diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-05-24 18:27:15 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-05-27 20:36:53 +0200 |
commit | 1679ec1204b53580a7b5cd6165865854c912dc29 (patch) | |
tree | 2bd60bce2eee2324a39986fd3d21b3aec7a40d9c /CMakeLists.txt | |
parent | 08e6b875c11e71b27154d4fb0d36d56ac40aba33 (diff) | |
download | libgit2-1679ec1204b53580a7b5cd6165865854c912dc29.tar.gz |
cmake: Add CMake check for libssh2 memory credential passing support
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 181d30127..c3c7a1543 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -270,6 +270,11 @@ IF (LIBSSH2_FOUND) LINK_DIRECTORIES(${LIBSSH2_LIBRARY_DIRS}) SET(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} libssh2") SET(SSH_LIBRARIES ${LIBSSH2_LIBRARIES}) + + CHECK_LIBRARY_EXISTS(${LIBSSH2_LIBRARIES} libssh2_userauth_publickey_frommemory "" HAVE_LIBSSH2_MEMORY_CREDENTIALS) + IF (HAVE_LIBSSH2_MEMORY_CREDENTIALS) + ADD_DEFINITIONS(-DGIT_SSH_MEMORY_CREDENTIALS) + ENDIF() ELSE() MESSAGE(STATUS "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") ENDIF() |