Caching ======= vcpkg_ caches many packages under the hood and reuses them whenever possible. It mostly is the case if a package has previously been built for a project and another project uses the exast same version of the package. vcpkg_ rely on package ABI (Application Binary Interface) to identify each package and determine if it can be reused. This can depend on many things: - package version, - port version, - target triplet, - host triplet, and many others. If the port hash is the same vcpkg_ will not rebuild the package and will instead use the cached one by copying results into: - The ``vcpkg_installed`` directory of the new project if using `vcpkg manifest mode`_. - The local vcpkg repository if using `vcpkg classic mode`_. This is why the following installation sections prefer to first install packages using the ``vcpkg install`` command before using it via CMake_ later during configuration phase. Errors are more easily spotted during the first part, and if the first installation is successfull, caching will allow to reuse the same packages during configuration as long as the package's ABI is identical. vcpkg_ stores its cache in common cache places, e.g. on Windows: - ``$env:LOCALAPPDATA``, - or ``C:\Users\\AppData\Local``. .. seealso:: For more information: `vcpkg binary caching`_ .. Links .. _CMake: https://cmake.org .. _vcpkg: https://vcpkg.io/en/ .. _vcpkg binary caching: https://learn.microsoft.com/en-us/vcpkg/users/binarycaching .. _vcpkg classic mode: https://learn.microsoft.com/en-us/vcpkg/concepts/ports .. _vcpkg manifest mode: https://learn.microsoft.com/en-us/vcpkg/consume/manifest-mode?tabs=msbuild%2Cbuild-MSBuild