Commit ed64a1b2 by Raphael Kubo da Costa Committed by Carlos Martín Nieto

Add libssh2's library and include directories.

Follow-up to 4f91bfa3 ("Find libssh2 via pkg-config"): FindPkgConfig sets
<foo>_INCLUDE_DIRS, not <foo>_INCLUDE_DIR like FindLIBSSH2 did.

Additionally, if using only FindPkgConfig to find libssh2, we have to
call LINK_DIRECTORIES() as well to pass the appropriate -L entries,
otherwise the build will only work if libssh2.so is in a directory
searched automatically by the linker.
parent 5c3e01d8
...@@ -217,7 +217,8 @@ IF (USE_SSH) ...@@ -217,7 +217,8 @@ IF (USE_SSH)
ENDIF() ENDIF()
IF (LIBSSH2_FOUND) IF (LIBSSH2_FOUND)
ADD_DEFINITIONS(-DGIT_SSH) 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(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} libssh2")
SET(SSH_LIBRARIES ${LIBSSH2_LIBRARIES}) SET(SSH_LIBRARIES ${LIBSSH2_LIBRARIES})
ENDIF() ENDIF()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment