Warning, /office/calligra/cmake/modules/FindLibgit2.cmake is written in an unsupported language. File is not indexed.
0001 # Copyright (c) 2014 Dan Leinir Turthra Jensen <admin@leinir.dk 0002 # 0003 # Redistribution and use is allowed according to the terms of the BSD license. 0004 # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 0005 0006 # - Try to find the libgit2 library 0007 # Once done this will define 0008 # 0009 # LIBGIT2_FOUND - System has libgit2 0010 # LIBGIT2_INCLUDE_DIR - The libgit2 include directory 0011 # LIBGIT2_LIBRARIES - The libraries needed to use libgit2 0012 # LIBGIT2_DEFINITIONS - Compiler switches required for using libgit2 0013 0014 0015 # use pkg-config to get the directories and then use these values 0016 # in the FIND_PATH() and FIND_LIBRARY() calls 0017 find_package(PkgConfig) 0018 pkg_search_module(PC_LIBGIT2 libgit2) 0019 0020 set(LIBGIT2_DEFINITIONS ${PC_LIBGIT2_CFLAGS_OTHER}) 0021 0022 find_path(LIBGIT2_INCLUDE_DIR NAMES git2.h 0023 HINTS 0024 ${PC_LIBGIT2_INCLUDEDIR} 0025 ${PC_LIBGIT2_INCLUDE_DIRS} 0026 ) 0027 0028 find_library(LIBGIT2_LIBRARIES NAMES git2 0029 HINTS 0030 ${PC_LIBGIT2_LIBDIR} 0031 ${PC_LIBGIT2_LIBRARY_DIRS} 0032 ) 0033 0034 0035 include(FindPackageHandleStandardArgs) 0036 find_package_handle_standard_args(libgit2 DEFAULT_MSG LIBGIT2_LIBRARIES LIBGIT2_INCLUDE_DIR) 0037 0038 mark_as_advanced(LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES)