Skip to content

vcpkg notes

mohammedzakikochargi edited this page Mar 15, 2023 · 16 revisions

Upgrade vcpkg port to use thirdparty library.

  1. Open vcpkg/ports/<package_name>/ .
  2. update the vcpkg_from_github() function in portfile.cmake file .
  3. In the function update the REPO Name required repo (ex: Apra-Labs/openh264) .
  4. Update REF to the required commit to extract the source code .
  5. calcaulate sha512 value for the above commit .
  6. changes the HEAD_REF to the target branch name of given repo .
  7. Update the version-date and port version in vcpkg/ports/<package_name>/vcpkg.json file.
  8. Update the baseline and port version in vcpkg/version/baseline.json file .
  9. commit the following vcpkg code.(Needs to be done)
  10. Now generate git-tree hash using the command: git rev-parse HEAD:ports/<package_name>
  11. Update git-tree with above generated hash, version-date and port-version in vcpkg/versions//package_name.json file
  12. commit and push the code the vcpkg code .
  13. Update Aprapipes/base/vcpkg.json file: Change the builtin-baseline with the latest commit ID of vcpkg, also change the vcpkg submodule point to the latest commit.

References: https://devblogs.microsoft.com/cppblog/registries-bring-your-own-libraries-to-vcpkg/