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