chore: baseline usable version

This commit is contained in:
dela
2026-06-10 11:17:51 +08:00
commit a2f82a86b6
932 changed files with 172551 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
if(NOT DEFINED input)
message(FATAL_ERROR "input not defined")
endif()
if(NOT DEFINED output)
message(FATAL_ERROR "output not defined")
endif()
if(NOT DEFINED name)
message(FATAL_ERROR "name not defined")
endif()
get_filename_component(_output_dir ${output} DIRECTORY)
if(NOT EXISTS ${_output_dir})
file(MAKE_DIRECTORY ${_output_dir})
endif()
file(READ ${input} _file_content HEX)
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1, " _hex_content ${_file_content})
file(WRITE ${output}
"unsigned char ${name}[] = {${_hex_content}};\n"
"unsigned int ${name}_len = sizeof(${name});\n"
)