mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 17:49:00 +08:00
12 lines
384 B
Plaintext
12 lines
384 B
Plaintext
libgit2 can be imported via CMake FindPkgConfig module:
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(LIBGIT2 REQUIRED IMPORTED_TARGET libgit2)
|
|
target_link_libraries(main PRIVATE PkgConfig::LIBGIT2)
|
|
|
|
vcpkg provides proprietary CMake targets:
|
|
|
|
find_package(unofficial-libgit2 CONFIG REQUIRED)
|
|
target_link_libraries(main PRIVATE unofficial::libgit2::libgit2)
|
|
|