Warning, /maui/bonsai/cmake/FindLibqgit2.cmake is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 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 libqgit2 library 0007 # Once done this will define 0008 # 0009 # LIBQGIT2_FOUND - System has libqgit2 0010 # LIBQGIT2_INCLUDE_DIR - The libqgit2 include directory 0011 # LIBQGIT2_LIBRARIES - The libraries needed to use libqgit2 0012 # LIBQGIT2_DEFINITIONS - Compiler switches required for using libqgit2 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_LIBQGIT2 libqgit2) 0019 0020 set(LIBQGIT2_DEFINITIONS ${PC_LIBQGIT2_CFLAGS_OTHER}) 0021 0022 find_path(LIBQGIT2_INCLUDE_DIR NAMES qgit2.h 0023 HINTS 0024 ${PC_LIBQGIT2_INCLUDEDIR} 0025 ${PC_LIBQGIT2_INCLUDE_DIRS} 0026 ) 0027 0028 find_library(LIBQGIT2_LIBRARIES NAMES qgit2 0029 HINTS 0030 ${PC_LIBQGIT2_LIBDIR} 0031 ${PC_LIBQGIT2_LIBRARY_DIRS} 0032 ) 0033 0034 0035 include(FindPackageHandleStandardArgs) 0036 find_package_handle_standard_args(libqgit2 DEFAULT_MSG LIBQGIT2_LIBRARIES LIBQGIT2_INCLUDE_DIR) 0037 0038 mark_as_advanced(LIBQGIT2_INCLUDE_DIR LIBQGIT2_LIBRARIES)