summaryrefslogtreecommitdiff
path: root/CMakeModules/Html2C.cmake
diff options
context:
space:
mode:
authorsaurabhb172020-02-26 16:20:48 +0530
committerGitHub2020-02-26 16:20:48 +0530
commitb77f5d9d8097c38159c6f60917995d6af13bbe1c (patch)
tree1392c90227aeea231c1d86371131e04c40382918 /CMakeModules/Html2C.cmake
parentdadc4d490966a24efe15b5cc533ef8695986048a (diff)
parent003d02608917e7a69d1a98438837e94ccf68352a (diff)
downloadKiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.tar.gz
KiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.tar.bz2
KiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.zip
Merge pull request #4 from FOSSEE/develop
merging dev into master
Diffstat (limited to 'CMakeModules/Html2C.cmake')
-rw-r--r--CMakeModules/Html2C.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeModules/Html2C.cmake b/CMakeModules/Html2C.cmake
new file mode 100644
index 0000000..99919b3
--- /dev/null
+++ b/CMakeModules/Html2C.cmake
@@ -0,0 +1,13 @@
+
+# CMake script file to process a text file by wrapping every line in double quotes.
+# Input file must not abuse quotes, staying with single quotes is probably best.
+
+set( lines "" )
+file( STRINGS ${inputFile} lines )
+
+file( WRITE ${outputFile} "// Do not edit this file, it is autogenerated by CMake from an HTML file\n" )
+
+foreach( line ${lines} )
+ STRING(REGEX REPLACE "\"" "\\\\\"" linem ${line})
+ file( APPEND ${outputFile} "\"" ${linem} "\\n\"\n" )
+endforeach( line ${lines} )