summaryrefslogtreecommitdiff
path: root/cmake/navit_xml_parser.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/navit_xml_parser.cmake')
-rw-r--r--cmake/navit_xml_parser.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/navit_xml_parser.cmake b/cmake/navit_xml_parser.cmake
new file mode 100644
index 000000000..d39833010
--- /dev/null
+++ b/cmake/navit_xml_parser.cmake
@@ -0,0 +1,8 @@
+file(STRINGS "${SRC}" TEXT_LINES REGEX "_\\(")
+file(WRITE ${DST} "// Strings from navit_shipped.xml\n")
+
+foreach (LINE ${TEXT_LINES})
+ message(STATUS ${LINE})
+ string(REGEX REPLACE ".*(_\\(\"[^\"]*\"\\)).*" "\\1\n" OUTPUT_LINE ${LINE})
+ file(APPEND ${DST} ${OUTPUT_LINE})
+endforeach()