aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/vcpkg_apply_patches.cmake
blob: dae9e6018b1e5506a6100e56681647edd8c15b15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# DEPRECATED: in favor of the `PATCHES` argument to [`vcpkg_from_github()`](vcpkg_from_github.md) et al.

#[===[.md
# vcpkg_apply_patches

Apply a set of patches to a source tree.

```cmake
vcpkg_apply_patches(
    SOURCE_PATH <${SOURCE_PATH}>
    [QUIET]
    PATCHES <patch1.patch>...
)
```
#]===]

function(vcpkg_apply_patches)
    z_vcpkg_deprecation_message("vcpkg_apply_patches has been deprecated in favor of the `PATCHES` argument to `vcpkg_from_*`.")

    cmake_parse_arguments(PARSE_ARGV 0 "arg" "QUIET" "SOURCE_PATH" "PATCHES")

    if(arg_QUIET)
        set(quiet "QUIET")
    else()
        set(quiet)
    endif()

    z_vcpkg_apply_patches(
        SOURCE_PATH "${arg_SOURCE_PATH}"
        ${quiet}
        PATCHES ${arg_PATCHES}
    )
endfunction()