summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <teromario@yahoo.com>2015-06-19 12:53:37 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2015-06-19 12:54:51 +0300
commite488bef42c6806cb8e4245ab31d98aba85dbcc8e (patch)
tree80a65a93bf44b06e2c15fe12bb483b18e079b823
parent6e0470e0f573b5ccecaa5048d906c1c80239333a (diff)
downloadlibgit2-e488bef42c6806cb8e4245ab31d98aba85dbcc8e.tar.gz
Quote LIBSSH2_LIBRARIES call
Credits to @directhex It is possible for PKG_CHECK_MODULES(LIBSSH2 libssh2) to LIBSSH2_LIBRARIES to a string with more than one library in it - e.g. if your libssh2 was built against libgcrypt, it will be "ssh2;gcrypt" Quoting the string is needed, or CHECK_LIBRARY_EXISTS will fail.
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3c7a1543..cecccb331 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -271,7 +271,7 @@ IF (LIBSSH2_FOUND)
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)
+ 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()