]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | # z_vcpkg_apply_patches |
2 | ||
3 | The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). | |
4 | ||
5 | **Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** | |
6 | ||
7 | Apply a set of patches to a source tree. | |
8 | ||
9 | ```cmake | |
10 | z_vcpkg_apply_patches( | |
11 | SOURCE_PATH <path-to-source> | |
12 | [QUIET] | |
13 | PATCHES <patch>... | |
14 | ) | |
15 | ``` | |
16 | ||
17 | The `<path-to-source>` should be set to `${SOURCE_PATH}` by convention, | |
18 | and is the path to apply the patches in. | |
19 | ||
20 | `z_vcpkg_apply_patches` will take the list of `<patch>`es, | |
21 | which are by default relative to the port directory, | |
22 | and apply them in order using `git apply`. | |
23 | Generally, these `<patch>`es take the form of `some.patch` | |
24 | to select patches in the port directory. | |
25 | One may also download patches and use `${VCPKG_DOWNLOADS}/path/to/some.patch`. | |
26 | ||
27 | If `QUIET` is not passed, it is a fatal error for a patch to fail to apply; | |
28 | otherwise, if `QUIET` is passed, no message is printed. | |
29 | This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. | |
30 | ||
31 | ## Source | |
32 | [scripts/cmake/z\_vcpkg\_apply\_patches.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_apply_patches.cmake) |