From 73641c4e73d8634eebe8fe00b96ba039da883b27 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 16 Jan 2017 15:56:56 -0800 Subject: build.sh: if new enough libgit2 is installed, use it Right now this is only designed for Linux where current distros all should have a new enough libgit2 (and our instructions tell people to install this with system tools, so we should also use it). Signed-off-by: Dirk Hohndel --- cmake/Modules/FindLIBGIT2.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/Modules/FindLIBGIT2.cmake b/cmake/Modules/FindLIBGIT2.cmake index cedb96d36..da51cc497 100644 --- a/cmake/Modules/FindLIBGIT2.cmake +++ b/cmake/Modules/FindLIBGIT2.cmake @@ -22,8 +22,13 @@ HINTS /usr/include ) +IF ( LIBGIT2_DYNAMIC ) + SET( LIBGIT2_SO libgit2.so ) +ENDIF() + FIND_LIBRARY( LIBGIT2_LIBRARIES NAMES + ${LIBGIT2_SO} libgit2.a git2 HINTS @@ -36,4 +41,4 @@ SET(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -lssl -lcrypto) INCLUDE( FindPackageHandleStandardArgs ) FIND_PACKAGE_HANDLE_STANDARD_ARGS( git2 DEFAULT_MSG LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES ) -include_directories(${LIBGIT2_INCLUDE_DIR}}) \ No newline at end of file +include_directories(${LIBGIT2_INCLUDE_DIR}}) -- cgit v1.2.3-70-g09d2