summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-01-16 15:56:56 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-01-16 17:00:55 -0800
commit73641c4e73d8634eebe8fe00b96ba039da883b27 (patch)
treeac75ab4d3e4cef086514a0a8955020a9c079e82d /cmake
parentc749498bebd84e9454abb289f819cdfffc346055 (diff)
downloadsubsurface-73641c4e73d8634eebe8fe00b96ba039da883b27.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindLIBGIT2.cmake7
1 files changed, 6 insertions, 1 deletions
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}})