diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:39:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:39:03 +0000 |
commit | 408c608fc7bf1557ee987dd7fbe662fabed21a53 (patch) | |
tree | 8b07135336de378134bfedc808d49747174810d3 /cmake/sed.cmake | |
parent | Initial commit. (diff) | |
download | frozen-408c608fc7bf1557ee987dd7fbe662fabed21a53.tar.xz frozen-408c608fc7bf1557ee987dd7fbe662fabed21a53.zip |
Adding upstream version 1.1.1.upstream/1.1.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/sed.cmake')
-rw-r--r-- | cmake/sed.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/sed.cmake b/cmake/sed.cmake new file mode 100644 index 0000000..feb0f1e --- /dev/null +++ b/cmake/sed.cmake @@ -0,0 +1,12 @@ +set(SED_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/sed.script.cmake" + CACHE INTERNAL "path to sed script") + +function(sed input_file output_file) + add_custom_command(OUTPUT "${output_file}" + COMMAND ${CMAKE_COMMAND} + -Dinput_file="${input_file}" + -Doutput_file="${output_file}" + -Dreplacement_pairs="${ARGN}" + -P ${SED_SCRIPT} + DEPENDS "${input_file}") +endfunction() |