TExcelTAD
Home › C/C++ Packages: Conan 2, vcpkg & CPM.cmake › Toolkit: vcpkg, Registries & Artifact Servers

Toolkit: vcpkg, Registries & Artifact Servers

The vcpkg side of the toolbox, plus the servers that store binaries for any of the package managers in this course.

vcpkg commands worth knowing

Command Use
vcpkg install install the manifest (or ports, in classic mode)
vcpkg add port <name> add a dependency to vcpkg.json
vcpkg search <text> find ports and their features
vcpkg depend-info the dependency graph (--format=tree/dot/mermaid)
vcpkg list what's installed (classic mode, or with --x-install-root)
vcpkg x-update-baseline move builtin-baseline to the latest commit
vcpkg format-manifest canonical formatting for manifests and port vcpkg.json files
vcpkg x-add-version record port versions in a registry
vcpkg export package installed libraries as a zip, NuGet package or prefab for machines without vcpkg
vcpkg env a shell with the installed tools on PATH (Windows)
vcpkg x-download / fetch download a file or a tool (cmake, ninja, git) the way vcpkg does
vcpkg license-report licenses of the installed packages

The x- prefix marks experimental commands: they work, but their interface may change between releases.

A useful report from the installed tree

vcpkg leaves machine-readable metadata in vcpkg_installed/. Two of the most useful files: the per-port vcpkg_abi_info.txt (cache keys, Binary Caching) and an SPDX SBOM per port, vcpkg.spdx.json. This session turns the SBOMs into a quick license and version inventory:

bash · try it yourself
mkdir -p app && cd app
echo '{ "builtin-baseline": "5d4a3dc90c0b3773f3bac81bf41297b54328f471", "dependencies": [ "spdlog", "catch2" ] }' > vcpkg.json
vcpkg install > /dev/null 2>&1
python3 - <<'PY'
import glob, json
for path in sorted(glob.glob("vcpkg_installed/x64-linux/share/*/vcpkg.spdx.json")):
    doc = json.load(open(path))
    port = next(p for p in doc["packages"] if p.get("SPDXID") == "SPDXRef-port")
    print(f"{port['name']:<20} {port['versionInfo']:<12} {port.get('licenseConcluded', '?')}")
PY
catch2               3.16.0       BSL-1.0
fmt                  12.2.0#1     MIT
spdlog               1.17.0#1     MIT
vcpkg-cmake-config   2026-07-21   MIT
vcpkg-cmake          2025-08-07   MIT

That's the raw material compliance and security teams ask for. Combine it with the binary cache and you can answer "which builds shipped spdlog 1.17.0?" from artifacts alone.

Registries and port sources

Source Notes
microsoft/vcpkg the builtin registry, ~2,500+ ports, tested together on every commit
vcpkg.io/packages searchable list of ports and versions
your git registry in-house ports with versions and baselines (Custom Registries)
overlay ports patches and one-off ports in your repository (Overlay Ports)
community registries some vendors publish their own (check who maintains it before trusting one)

Artifact servers for binaries

All three package managers need somewhere to keep binaries or sources for a team. Common choices:

Server Conan vcpkg binary cache Notes
JFrog Artifactory (CE for C/C++ is free) native Conan repositories NuGet or generic (HTTP) repositories the most common choice for Conan
Sonatype Nexus Repository Conan proxy/hosted support (check your version) NuGet, raw popular in Java-heavy companies
GitHub Packages no Conan support NuGet feed convenient for GitHub Actions
Azure Artifacts no Conan support NuGet feed, Universal Packages convenient with Azure DevOps
GitLab Package Registry Conan repository (feature status depends on your GitLab version) NuGet, generic
Cloud storage (S3, GCS, Azure Blob) via a server in front x-aws, x-gcs, x-azblob providers cheap, no UI
A shared folder local-recipes-index (recipes only) files provider small teams, air-gapped networks

Neighbouring tools

Tool Relation
ccache / sccache compiler caches; essential with CPM, useful with everything (Build Performance)
Renovate, Dependabot dependency-update bots; Renovate has a Conan manager, while vcpkg baselines are often bumped by a scheduled CI job running vcpkg x-update-baseline. Check current support before relying on either
Syft, CycloneDX tools SBOM generation and merging (Supply Chain Security)
xmake / xrepo, build2, Meson WrapDB other C/C++ ecosystems with their own package handling (Meson, Autotools & xmake)
Spack, Nix, Conda package managers from HPC, functional and data-science worlds that also ship C++ libraries

Test yourself

What does the x- prefix on a vcpkg command mean?

  1. It's deprecated
  2. It's experimental: it works, but its interface may change
  3. It needs admin rights
  4. It runs on Windows only

Where did the license inventory in the session come from?

  1. The internet
  2. The SPDX SBOM file vcpkg writes for each installed port (vcpkg.spdx.json)
  3. The CMake cache
  4. vcpkg list

Which server can store native Conan packages AND act as a NuGet binary cache for vcpkg?

  1. GitHub Packages
  2. Azure Artifacts
  3. JFrog Artifactory
  4. A shared folder