aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/vcpkg_replace_string.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cmake/vcpkg_replace_string.cmake')
-rw-r--r--scripts/cmake/vcpkg_replace_string.cmake11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/cmake/vcpkg_replace_string.cmake b/scripts/cmake/vcpkg_replace_string.cmake
index d24b8677e..1f8b37b65 100644
--- a/scripts/cmake/vcpkg_replace_string.cmake
+++ b/scripts/cmake/vcpkg_replace_string.cmake
@@ -4,13 +4,12 @@
Replace a string in a file.
```cmake
-vcpkg_replace_string(filename match_string replace_string)
+vcpkg_replace_string(<filename> <match> <replace>)
```
-
#]===]
-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}")
+function(vcpkg_replace_string filename match replace)
+ file(READ "${filename}" contents)
+ string(REPLACE "${match}" "${replace}" contents "${contents}")
+ file(WRITE "${filename}" "${contents}")
endfunction()