summaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2014-12-10 10:08:42 +0100
committerAaron Seigo <aseigo@kde.org>2014-12-11 01:02:32 +0100
commit997637b3b466e1f1c95405a3d43a78d78d4ba259 (patch)
tree65f383e7001106e4bf1a8e9dcaca79859dba2fae /cmake/modules
parent558ca7f17ae4f6df48b999e98c4004a49549cd79 (diff)
downloadsink-997637b3b466e1f1c95405a3d43a78d78d4ba259.tar.gz
sink-997637b3b466e1f1c95405a3d43a78d78d4ba259.zip
commit hashes!
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindLibgit2.cmake33
1 files changed, 33 insertions, 0 deletions
diff --git a/cmake/modules/FindLibgit2.cmake b/cmake/modules/FindLibgit2.cmake
new file mode 100644
index 0000000..410eab0
--- /dev/null
+++ b/cmake/modules/FindLibgit2.cmake
@@ -0,0 +1,33 @@
1# - Try to find the libgit2 library
2# Once done this will define
3#
4# LIBGIT2_FOUND - System has libgit2
5# LIBGIT2_INCLUDE_DIR - The libgit2 include directory
6# LIBGIT2_LIBRARIES - The libraries needed to use libgit2
7# LIBGIT2_DEFINITIONS - Compiler switches required for using libgit2
8
9
10# use pkg-config to get the directories and then use these values
11# in the FIND_PATH() and FIND_LIBRARY() calls
12#FIND_PACKAGE(PkgConfig)
13#PKG_SEARCH_MODULE(PC_LIBGIT2 libgit2)
14
15SET(LIBGIT2_DEFINITIONS ${PC_LIBGIT2_CFLAGS_OTHER})
16
17FIND_PATH(LIBGIT2_INCLUDE_DIR NAMES git2.h
18 HINTS
19 ${PC_LIBGIT2_INCLUDEDIR}
20 ${PC_LIBGIT2_INCLUDE_DIRS}
21 )
22
23FIND_LIBRARY(LIBGIT2_LIBRARIES NAMES git2
24 HINTS
25 ${PC_LIBGIT2_LIBDIR}
26 ${PC_LIBGIT2_LIBRARY_DIRS}
27 )
28
29
30INCLUDE(FindPackageHandleStandardArgs)
31FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgit2 DEFAULT_MSG LIBGIT2_LIBRARIES LIBGIT2_INCLUDE_DIR)
32
33MARK_AS_ADVANCED(LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES)