Skip to content

Commit

Permalink
Merge pull request libgit2#358 from carlosmn/pkg-config
Browse files Browse the repository at this point in the history
Create and install pkg-config file
  • Loading branch information
vmg committed Aug 7, 2011
2 parents a655cc3 + 2327a7c commit 5bd4fb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ ENDIF ()
TARGET_LINK_LIBRARIES(git2 ${CMAKE_THREAD_LIBS_INIT})
SET_TARGET_PROPERTIES(git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING})
SET_TARGET_PROPERTIES(git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR})
CONFIGURE_FILE(libgit2.pc.in libgit2.pc)

# Install
INSTALL(TARGETS git2
RUNTIME DESTINATION ${INSTALL_BIN}
LIBRARY DESTINATION ${INSTALL_LIB}
ARCHIVE DESTINATION ${INSTALL_LIB}
)
INSTALL(FILES libgit2.pc DESTINATION ${INSTALL_LIB}/pkgconfig )
INSTALL(DIRECTORY include/git2 DESTINATION ${INSTALL_INC} )
INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} )

Expand Down
8 changes: 3 additions & 5 deletions libgit2.pc.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
prefix=@prefix@
exec_prefix=${prefix}
libdir=@libdir@
includedir=${prefix}/include
libdir=@CMAKE_INSTALL_PREFIX@/@INSTALL_LIB@
includedir=@CMAKE_INSTALL_PREFIX@/@INSTALL_INC@

Name: libgit2
Description: The git library, take 2
Version: @version@
Version: @LIBGIT2_VERSION_STRING@
Requires: libcrypto
Libs: -L${libdir} -lgit2 -lz -lcrypto
Cflags: -I${includedir}

0 comments on commit 5bd4fb5

Please sign in to comment.