Skip to content

docs/install.rst: added pkg-config as a dependency for building libgit2. - #497

Merged
jdavid merged 2 commits into
libgit2:masterfrom
kitsemets:improve_install_doc
Mar 8, 2015
Merged

jdavid merged 2 commits into
libgit2:masterfrom
kitsemets:improve_install_doc

Conversation

@kitsemets

Copy link
Copy Markdown
Contributor

Without pkg-config it is not possible to build libgit2 with ssh support.
In libgit2/CMakeLists.txt the detection of libssh2library is done with PKG_CHECK_MODULES:

IF (USE_SSH)
        PKG_CHECK_MODULES(LIBSSH2 libssh2)
ENDIF()
IF (LIBSSH2_FOUND)
        ADD_DEFINITIONS(-DGIT_SSH)
        INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIRS})
        LINK_DIRECTORIES(${LIBSSH2_LIBRARY_DIRS})
        SET(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} libssh2")
        SET(SSH_LIBRARIES ${LIBSSH2_LIBRARIES})
ELSE()
        MESSAGE(STATUS "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.")
ENDIF()

If pkg-config package does not exist, it'll continue without adding libssh2 support.

…t2. Without pkg-config it is not possible to build libgit2 with ssh support.
@carlosmn

carlosmn commented Mar 2, 2015

Copy link
Copy Markdown
Member

pkg-config is also an optional dependency, as libgit2 builds just fine without it.

@jdavid

jdavid commented Mar 6, 2015

Copy link
Copy Markdown
Member

So it should be clearly stated that pkg-config is only required for SSH support, just like the libssh2 dependency above.

@jdavid
jdavid merged commit 2d3f9d8 into libgit2:master Mar 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants