Vcpkg_download_distfile ((full)) May 2026
: The name the file will take in the downloads/ directory. It is a best practice to use a unique name (e.g., portname-version.tar.gz ) to avoid conflicts with other ports using the same generic filenames like source.zip .
: This bypasses the local cache and forces a fresh download every time the port is built. This is generally used for REST API calls or assets that are known to be unstable. vcpkg_download_distfile
: The name of the variable that will store the full local path to the downloaded file. This is typically named ARCHIVE and then passed to vcpkg_extract_source_archive . : The name the file will take in the downloads/ directory
In the ecosystem of the vcpkg C++ package manager , the vcpkg_download_distfile function is the fundamental tool for acquiring source code or assets from the web. While specialized helpers like vcpkg_from_github or vcpkg_from_gitlab exist for common hosting services, vcpkg_download_distfile serves as the versatile "Swiss Army knife" for downloading files from generic URLs, custom servers, or unusual distribution points. Core Usage and Syntax This is generally used for REST API calls