From 997637b3b466e1f1c95405a3d43a78d78d4ba259 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 10 Dec 2014 10:08:42 +0100 Subject: commit hashes! --- cmake/modules/FindLibgit2.cmake | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 cmake/modules/FindLibgit2.cmake (limited to 'cmake') 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 @@ +# - Try to find the libgit2 library +# Once done this will define +# +# LIBGIT2_FOUND - System has libgit2 +# LIBGIT2_INCLUDE_DIR - The libgit2 include directory +# LIBGIT2_LIBRARIES - The libraries needed to use libgit2 +# LIBGIT2_DEFINITIONS - Compiler switches required for using libgit2 + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +#FIND_PACKAGE(PkgConfig) +#PKG_SEARCH_MODULE(PC_LIBGIT2 libgit2) + +SET(LIBGIT2_DEFINITIONS ${PC_LIBGIT2_CFLAGS_OTHER}) + +FIND_PATH(LIBGIT2_INCLUDE_DIR NAMES git2.h + HINTS + ${PC_LIBGIT2_INCLUDEDIR} + ${PC_LIBGIT2_INCLUDE_DIRS} + ) + +FIND_LIBRARY(LIBGIT2_LIBRARIES NAMES git2 + HINTS + ${PC_LIBGIT2_LIBDIR} + ${PC_LIBGIT2_LIBRARY_DIRS} + ) + + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgit2 DEFAULT_MSG LIBGIT2_LIBRARIES LIBGIT2_INCLUDE_DIR) + +MARK_AS_ADVANCED(LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES) -- cgit v1.2.3