Skip to content
C++

C++ Package Managers

Conan 2, vcpkg, xrepo, CPM.cmake, and Hunter — compared across package availability, binary caching, CMake integration, and workflow fit.

Quick pick

vcpkg — best default. Largest catalog, seamless CMake integration.
Conan 2 — when you need binary packages, cross-compilation, or a private server.
CPM.cmake — simplest possible setup for small CMake projects with GitHub deps.

Comparison matrix

FeaturevcpkgConan 2xrepoCPM.cmakeHunter
Packages2 400+1 600+ (ConanCenter)1 000+Any CMake project on GitHub500+
Binary cacheDownload cachePer-user
CMake integrationNative (toolchain file / CMakePresets)CMakeDeps / CMakeToolchain generatorsVia cmake integrationNative — is a CMake moduleNative
VersioningBaseline pinningSemver + lock filesVersion pinningGit tags / commitsSHA pinning
Cross-compileLimited
VendorMicrosoftJFrogxmakeCommunityCommunity
vcpkg

Microsoft's package manager — seamless CMake/MSBuild integration, huge library catalog, manifest mode.

  • Largest C++ package catalog
  • Zero-config CMake integration
  • GitHub Actions & CI binary caching
  • Manifest mode for reproducible builds
  • Free, open source
Full guide
Conan 2

Most powerful and flexible — binary packages, profiles, cross-compilation, self-hosted server.

  • Pre-built binary packages from ConanCenter
  • Powerful profiles (compiler, OS, arch, settings)
  • Self-hosted Artifactory server
  • Best cross-compilation support
  • Python-based conanfile for full flexibility
Full guide
xrepo

Bundled with xmake — Lua-configured, supports 1000+ packages, works standalone too.

  • Built into xmake — zero extra setup
  • Works standalone with CMake/other tools
  • Fast source-based builds with caching
  • Good Windows support
Full guide
CPM.cmake

Single CMake file, zero overhead — wraps FetchContent with caching and version pinning.

  • Zero install — just one cmake file
  • Works with any CMake project on GitHub
  • Download caching
  • Simplest possible setup
Full guide
Hunter

CMake-only, header-based bootstrap, per-user cache. Older but still used in some projects.

  • No external tool needed
  • Per-user package cache
  • Works in CMake ExternalProject style
Full guide

Deep-dive guides