]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/docs/maintainers/vcpkg_download_distfile.md
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / docs / maintainers / vcpkg_download_distfile.md
1 # vcpkg_download_distfile
2
3 The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_download_distfile.md).
4
5 Download and cache a file needed for this port.
6
7 This helper should always be used instead of CMake's built-in `file(DOWNLOAD)` command.
8
9 ## Usage
10 ```cmake
11 vcpkg_download_distfile(
12 <OUT_VARIABLE>
13 URLS <http://mainUrl> <http://mirror1>...
14 FILENAME <output.zip>
15 SHA512 <5981de...>
16 )
17 ```
18 ## Parameters
19 ### OUT_VARIABLE
20 This variable will be set to the full path to the downloaded file. This can then immediately be passed in to [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md) for sources.
21
22 ### URLS
23 A list of URLs to be consulted. They will be tried in order until one of the downloaded files successfully matches the SHA512 given.
24
25 ### FILENAME
26 The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts.
27
28 ### SHA512
29 The expected hash for the file.
30
31 If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch.
32
33 ### QUIET
34 Suppress output on cache hit
35
36 ### SKIP_SHA512
37 Skip SHA512 hash check for file.
38
39 This switch is only valid when building with the `--head` command line flag.
40
41 ### HEADERS
42 A list of headers to append to the download request. This can be used for authentication during a download.
43
44 Headers should be specified as "<header-name>: <header-value>".
45
46 ## Notes
47 The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downloading from GitHub projects.
48
49 ## Examples
50
51 * [apr](https://github.com/Microsoft/vcpkg/blob/master/ports/apr/portfile.cmake)
52 * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake)
53 * [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake)
54
55 ## Source
56 [scripts/cmake/vcpkg\_download\_distfile.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_download_distfile.cmake)