sensei-raw-ctl/quote-file.cmake

5 lines
161 B
CMake
Raw Normal View History

2013-06-02 23:50:33 +02:00
file (READ ${input} contents)
string (REPLACE "\n" "\\n\"\n\"" contents "${contents}")
file (WRITE ${output}
"const char ${var_name}[] = \n\"${contents}\";\n")