diff options
author | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2015-01-24 16:15:12 +0200 |
---|---|---|
committer | Carlos MartÃn Nieto <cmn@dwim.me> | 2015-03-21 21:12:09 +0100 |
commit | ed64a1b268e743e8102cdb744dff5e713456e89e (patch) | |
tree | 99c1a640c4ad7cf85096b5a48d9b0fc558e0243d | |
parent | 5c3e01d89172cd5f3bad6bbf7151556f44ac2dba (diff) | |
download | libgit2-ed64a1b268e743e8102cdb744dff5e713456e89e.tar.gz |
Add libssh2's library and include directories.
Follow-up to 4f91bfa ("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.
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b4d42e060..4f36dce7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,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}) ENDIF() |