You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
509 B

  1. # CMake script file to process a text file for use as an immediate string value in C/C++.
  2. # It escapes double-quotes and then wraps every line in (unescaped) double-quotes.
  3. set( lines "" )
  4. file( STRINGS ${inputFile} lines )
  5. file( WRITE ${outputFile} "// Do not edit this file, it is autogenerated by CMake from a .txt file\n" )
  6. foreach( line IN LISTS lines )
  7. STRING(REGEX REPLACE "\"" "\\\\\"" linem "${line}" )
  8. file( APPEND ${outputFile} "\"" "${linem}" "\\n\"\n" )
  9. endforeach( line "${lines}" )