Merge pull request #2845 from rakuco/libssh2-detection-fix Add libssh2's library and include directories.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7db18c7..69ce6fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -218,7 +218,8 @@ IF (USE_SSH)
ENDIF()
IF (LIBSSH2_FOUND)
ADD_DEFINITIONS(-DGIT_SSH)
- INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIRS})
+ LINK_DIRECTORIES(${LIBSSH2_LIBRARY_DIRS})
SET(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} libssh2")
SET(SSH_LIBRARIES ${LIBSSH2_LIBRARIES})
ELSE()