blob: 1f8b37b656fb6abca6398ff0c23319ebb35ce729 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#[===[.md:
# vcpkg_replace_string
Replace a string in a file.
```cmake
vcpkg_replace_string(<filename> <match> <replace>)
```
#]===]
function(vcpkg_replace_string filename match replace)
file(READ "${filename}" contents)
string(REPLACE "${match}" "${replace}" contents "${contents}")
file(WRITE "${filename}" "${contents}")
endfunction()
|