2019-06-20 02:58:25 +03:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2019-03-08 06:29:53 +03:00
|
|
|
#
|
2019-06-20 02:58:25 +03:00
|
|
|
# This software may be used and distributed according to the terms of the
|
|
|
|
# GNU General Public License version 2.
|
|
|
|
|
2018-05-01 00:28:44 +03:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package(PkgConfig)
|
|
|
|
|
2019-09-21 04:20:17 +03:00
|
|
|
pkg_check_modules(LibGit2 libgit2 QUIET IMPORTED_TARGET)
|
|
|
|
if(LibGit2_FOUND)
|
|
|
|
set_target_properties(PkgConfig::LibGit2 PROPERTIES IMPORTED_GLOBAL True)
|
|
|
|
add_library(libgit2 ALIAS PkgConfig::LibGit2)
|
2018-05-01 00:28:44 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package_handle_standard_args(
|
2019-09-21 04:20:17 +03:00
|
|
|
LibGit2
|
|
|
|
REQUIRED_VARS LibGit2_PREFIX
|
|
|
|
VERSION_VAR LibGit2_VERSION
|
2018-05-01 00:28:44 +03:00
|
|
|
)
|