vcpkg for C++ dependency management: manifest mode, triplets and build system integration
C++ Library Manager for Windows, Linux, and MacOS
At a glance
- What is it?
- vcpkg is Microsoft's cross-platform C/C++ package manager, distributed as source through bootstrap scripts rather than installers. Its manifest mode and triplet system solve version pinning and target selection, but the binary cache and asset cache are what decide whether a large dependency tree is practical.
- Who is it for?
- Adopt vcpkg if you build C++ on more than one platform and want dependency versions recorded in a manifest that lives with your source, or if you are already inside Visual Studio and MSBuild. Do not adopt it expecting a system package manager: it builds ports from source, downloads from upstream distribution locations, and behind a firewall the access needed depends on which ports you install.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly CMake, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- microsoft/vcpkg27,602 ★ · +95
| Repository | 2026-09-28 | 2026-11-15 |
|---|---|---|
| microsoft/vcpkg | 27.5k | 27.6k |
95 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The dependency problem vcpkg was built to solve
C and C++ never settled on a standard way to declare and resolve library dependencies. The result is that most projects vendor third-party source into the tree, or rely on whatever the host system happens to ship. Neither approach survives a move between Windows, macOS and Linux. vcpkg is Microsoft's answer: a package manager that installs and builds C/C++ libraries across all three platforms, written in C++ with scripts in CMake, and maintained by Microsoft together with the C++ community. The README states it started in 2016 as a migration aid for newer Visual Studio versions and grew into a cross-platform tool. That history shows in the design: integration with MSBuild and Visual Studio is first class, but the project now documents CMake, Visual Studio Code, CLion and Qt Creator workflows as well. The audience is anyone with a C++ project whose dependencies need to be reproducible on a machine they do not control.
Manifests, ports and triplets: how vcpkg actually resolves a dependency
The core artifact is a port: a recipe describing where to fetch a library's source and how to build it. Ports live in the repository's ports/ directory, and the registry is what vcpkg consults when you ask for a library by name. Two consumption modes exist. Classic mode installs packages into a shared tree on your machine, so the set of installed libraries is global state. Manifest mode puts a vcpkg.json file in your project and resolves dependencies per project, which is the mode that keeps two projects from fighting over library versions. Target selection is handled by triplets, which name the platform and architecture combination a port is built for; the triplets/ directory holds the definitions. Version control is a documented feature: the README points to a versioning page under the users documentation. Binary caching and asset caching are separate features, and they matter more than they first appear. Binary caching reuses compiled artifacts instead of rebuilding them, while asset caching stores downloaded source so offline and air-gapped builds have something to read from.
Installing vcpkg and adding your first dependency
The repository does not ship prebuilt installers. It ships bootstrap-vcpkg.sh and bootstrap-vcpkg.bat at the top level, and the official quick start guides linked from the README are the place the project sends you for platform-specific steps. The commands below are the ones the README itself shows, so treat them as the shape of the workflow rather than a complete install transcript.
Manifest mode is the recommended starting point. The README gives this pair of commands, which creates a vcpkg.json for the project and records the fmt library as a dependency:
vcpkg new --application
vcpkg add port fmtClassic mode installs into the shared tree instead, and the README shows the single command form:
vcpkg install fmtOnce packages are resolved, you connect vcpkg to your build system. The README points to integration pages for CMake, MSBuild and manual integration for everything else. For a short description of every available command the README says to run vcpkg help, and vcpkg help [topic] for a specific topic:
vcpkg help
vcpkg help installThe bootstrap scripts accept a -disableMetrics flag, which is one of the three documented ways to turn off telemetry. The other two are passing --disable-metrics on the command line and setting the VCPKG_DISABLE_METRICS environment variable. If you are installing behind a corporate proxy or on a shared build machine, decide on that setting before you bootstrap, because it is easier to set once than to audit later.
Where vcpkg gets in the way
The security section of the README is unusually direct about the central constraint: most ports build the library using the original developers' preferred build system and download source and build tools from official distribution locations. That means vcpkg is not a mirror. It is an orchestrator that reaches out to upstream hosts on your behalf, and the specific network access required depends on which ports you install. In an air-gapped environment the README's own suggestion is to install once in a connected environment and populate an asset cache shared with the isolated one. That is a real workflow, but it is a workflow with two machines and a shared cache, not a flag. The second constraint is build time. Because ports compile from source, a cold machine with a large dependency list pays for every library. Binary caching is the documented answer, and if you skip it you will feel the cost on every clean CI runner. A third limitation is coverage. If a library you need is not in the registry, the README's instruction is to open an issue or contribute the package yourself.
vcpkg versus Conan, and when a system package manager is the better answer
Conan is the comparison people reach for, and the difference is architectural rather than cosmetic. vcpkg's registry is the ports tree inside the repository, and its default behaviour is to build ports from source on your machine, with binary caching available as an optimization. Neither is strictly better. On Linux distributions, a system package manager such as apt or dnf is often the right tool when the library version the distribution ships is acceptable and you want distribution security updates. vcpkg earns its place when you need a specific version, a specific compiler, or the same dependency set on Windows, macOS and Linux, and when you want that set written into the repository next to the code.
Maintenance, releases and what the MIT licence does not cover
The repository is not archived, and the last push was on 2026-11-02. Releases follow a dated scheme: 2026.10.16, 2026.07.29 and 2026.06.24 are the most recent. That cadence is a maintenance signal, but it also means the ports tree moves. Ports are updated continuously between releases, so a vcpkg.json that resolves today may resolve to different port versions after you update your checkout. The versioning documentation referenced in the README is the mechanism for pinning that down; if you do not use it, treat your dependency set as a moving target. On licensing, the split is clean: the code in this repository is MIT, while the libraries provided by ports carry their original authors' licences. vcpkg places those licence files, where available, at installed/<triplet>/share/<port>/copyright. That path is worth automating a check against if your product ships third-party binaries, because MIT on the tool tells you nothing about the libraries you link. This is a description of what the repository states, not legal advice; review the actual licence files for each port you depend on.
Editorial conclusion
Adopt vcpkg if you build C++ on more than one platform and want dependency versions recorded in a manifest that lives with your source, or if you are already inside Visual Studio and MSBuild. Do not adopt it expecting a system package manager: it builds ports from source, downloads from upstream distribution locations, and behind a firewall the access needed depends on which ports you install. Before committing, verify three things: that your compiler and target are covered by an existing triplet, that your dependency list exists in the registry or you are prepared to write ports yourself, and that you have a binary or asset cache plan, because without one every clean build recompiles the whole tree.
Frequently asked questions
What is vcpkg?
It is a free and open-source C/C++ package manager maintained by Microsoft and the C++ community. It installs and builds libraries on Windows, macOS and Linux, and is written in C++ with scripts in CMake.
Where should vcpkg be installed?
The README does not prescribe a location. It directs readers to the quick start guides on Microsoft Learn for platform-specific steps, and the repository ships bootstrap-vcpkg.sh and bootstrap-vcpkg.bat for setting it up.
Is vcpkg Windows only?
No. It started in 2016 as a tool for migrating projects to newer Visual Studio versions, but the README states it has evolved into a cross-platform tool used on Windows, macOS and Linux.
How do I use vcpkg in a CMake project?
The README links a dedicated CMake quick start guide and a CMake integration page under build system integration. The workflow is to resolve dependencies with vcpkg and then connect the installed packages to CMake through that integration.
How do I install vcpkg?
The repository ships bootstrap-vcpkg.sh and bootstrap-vcpkg.bat at the top level, and the README sends you to the official quick start guides for the platform-specific procedure. The bootstrap script accepts -disableMetrics if you want telemetry off from the start.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/microsoft-vcpkg)Star history chart for your README
[](https://hysenlabs.com/projects/microsoft-vcpkg)Was this useful?