1
0
mirror of synced 2024-12-15 01:01:15 +01:00
ImHex/plugins/script_loader/dotnet/post_process_runtimeconfig.cmake

7 lines
311 B
CMake
Raw Normal View History

file(READ "${OUTPUT_RUNTIMECONFIG}" FILE_CONTENTS)
set(VERSION_REGEX [["version": "([0-9]+\.[0-9]+\.[0-9]+)"]])
set(REPLACE_VALUE [["version": "7.0.0"]])
string(REGEX REPLACE "${VERSION_REGEX}" ${REPLACE_VALUE} FILE_CONTENTS_OUT "${FILE_CONTENTS}")
file(WRITE "${OUTPUT_RUNTIMECONFIG}" "${FILE_CONTENTS_OUT}")