vcpkg
C/C++ cross-platform package manager
TLDR
Search for a package
SYNOPSIS
vcpkg command [options] [package...]
DESCRIPTION
vcpkg is Microsoft's cross-platform C/C++ package manager for acquiring and managing library dependencies. It provides access to thousands of open-source libraries that can be built and integrated into projects on Windows, macOS, and Linux.
Unlike system package managers, vcpkg allows multiple versions of the same library to coexist and supports cross-compilation through triplets. It integrates seamlessly with CMake and MSBuild, automatically configuring include paths and link libraries.
Packages are built from source using curated build scripts (portfiles) maintained in the vcpkg registry. This ensures consistent builds across platforms and allows customization of build options. The tool can operate in classic mode with a central installation or manifest mode with per-project dependencies.
Configuration is done through environment variables (VCPKGROOT, VCPKGDEFAULT_TRIPLET) or command-line options.
PARAMETERS
search [pattern]
Search for packages matching the pattern.install package[:triplet]
Install a package, optionally specifying a target triplet.remove package
Remove an installed package.list
List all installed packages.update
Update vcpkg itself and refresh the package catalog.upgrade
Rebuild all outdated packages.integrate install
Enable system-wide integration with build systems.integrate remove
Remove system-wide integration.export package --zip|--nuget
Export installed packages to a portable format.help [topic]
Display help on a specific command or topic.--triplet triplet
Specify target platform (e.g., x64-linux, x86-windows, arm64-osx).--disable-metrics
Disable telemetry data collection.
CAVEATS
Building packages from source can be time-consuming, especially for large libraries. Some packages may require system dependencies to be installed first. Binary caching can speed up repeated builds but requires additional configuration. The default triplet varies by platform.
HISTORY
vcpkg was developed by Microsoft and first released in September 2016 to help C++ developers manage dependencies on Windows. It was initially focused on Visual Studio integration but expanded to become a cross-platform tool supporting Linux and macOS. The project is open source under the MIT license and maintained on GitHub with active community contributions.
