blob: 3eb18d0bf75dbf1db9ce7d174b60e033c758ca9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#.rst:
# .. command:: vcpkg_replace_string
#
# Replace a string in a file.
#
# ::
# 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()
|