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>/
    • . update the vcpkg_from_github() function in portfile.cmake file
      1. Update the REPO Name with the target repo (ex: Apra-Labs/openh264)
      2. Update REF to the required commit to extract the source code .
      3. calcaulate sha512 value for the above commit.
      4. changes the HEAD_REF to the target branch name of given repo.
    • . Update the version-date and port version in vcpkg/ports/<package_name>/vcpkg.json file.
  2. Update the baseline and port version in vcpkg/version/baseline.json file .
  3. commit the following vcpkg code.(Needs to be done)
  4. Now generate git-tree hash using the command: git rev-parse HEAD:ports/<package_name>
  5. Update git-tree with above generated hash, version-date and port-version in vcpkg/versions//package_name.json file
  6. commit and push the code the vcpkg code
  7. 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.
  8. Also delete buildtrees, downloads, packages and installed folders in ApraPipes/vcpkg/ .
  9. If Above point 8 does not work try to delete archives in C:\Users\developer\AppData\Local\vcpkg\

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