From 9a86d030aec4d3a54d76f640c7aec31f4f35d166 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 18 Dec 2014 18:34:32 +0100 Subject: Instead of a minimum required version, just check wether we have the required functions. --- cmake/modules/FindLibgit2.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/modules/FindLibgit2.cmake b/cmake/modules/FindLibgit2.cmake index 410eab0..f33db4a 100644 --- a/cmake/modules/FindLibgit2.cmake +++ b/cmake/modules/FindLibgit2.cmake @@ -26,8 +26,11 @@ FIND_LIBRARY(LIBGIT2_LIBRARIES NAMES git2 ${PC_LIBGIT2_LIBRARY_DIRS} ) +#Should be replaced by a version check +include(CheckFunctionExists) +CHECK_FUNCTION_EXISTS(git_buf_free HAVE_BUF_FREE) INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgit2 DEFAULT_MSG LIBGIT2_LIBRARIES LIBGIT2_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgit2 DEFAULT_MSG LIBGIT2_LIBRARIES LIBGIT2_INCLUDE_DIR HAVE_BUF_FREE) MARK_AS_ADVANCED(LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES) -- cgit v1.2.3