vcpkg/ports/libgit2/usage

12 lines
384 B
Plaintext
Raw Normal View History

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)