Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

How to install specific version commit using Vcpkg

Kan Tang edited this page Jul 10, 2019 · 6 revisions
  1. In Vcpkg’s installation folder, find folder <vcpkg_root>\ports\azure-storage-cpp\.
  2. Open portfile.cmake, find following code:
vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO azure/azure-storage-cpp
    REF v6.0.0
    SHA512 e568c3c3fd10a688b4d2491987998b1e133e54853fbf94a238a0cc3955dfd4d68bedf79a0e30bb5f30e8dd3c2bf41999d7c8658571b7dca9a4058140258ca314
    HEAD_REF master
)

Change it to

vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO azure/azure-storage-cpp (or any other repository you want to point to)
    REF <Commit ID/tag>
    SHA512 <SHA512 for the commit you want>
    HEAD_REF <The branch/head you needed>
)
  1. Remove azure-storage-cpp and re-install.

Note that step 3 will generate an error message showing the actual SHA512 and mismatch SHA512 you set if you don't want to calculate yourself. Simply replace the wrong one with actual SHA512 and re-run step 3 will succeed.

Changing the portfile of cpprestsdk in <vcpkg_root>\ports\cpprestsdk\ accordingly can make sure that a prefered cpprestsdk version is chosen. The suggested version of cpprestsdk for azure-storage-cpp can be found in the Readme File.

Clone this wiki locally