Hacker News new | ask | show | jobs
by flohofwoe 769 days ago
Can I write a vcpkg.json that just refers to a git repository, tgz download link or similar decentralized identifier? (eg can I also use deps that have no special vcpkg support?)
1 comments

You need to create an overlay port[1] for each dependency that isn't on vcpkg. So you need, at minimum, a `portfile.cmake` and a `vcpkg.json`[2] for each new dependency.

> just refers to a git repository, tgz download link or similar decentralized identifier

In the `portfile.cmake`, use the following functions correspondingly:

- vcpkg_from_git: https://learn.microsoft.com/en-gb/vcpkg/maintainers/function...

- vcpkg_download_distfile: https://learn.microsoft.com/en-gb/vcpkg/maintainers/function...

Each documentation link has a bunch of live examples near the bottom of the page.

[1]: https://learn.microsoft.com/en-gb/vcpkg/concepts/overlay-por...

[2]: https://learn.microsoft.com/en-us/vcpkg/get_started/get-star...