diff options
Diffstat (limited to 'replace-enum-strings.cmake')
-rw-r--r-- | replace-enum-strings.cmake | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/replace-enum-strings.cmake b/replace-enum-strings.cmake new file mode 100644 index 0000000..42fdbff --- /dev/null +++ b/replace-enum-strings.cmake @@ -0,0 +1,21 @@ +# CMake script to replace items
+# in sources generated by glib-mkenums
+
+FILE(READ ${ENUM_INPUT_SRC} enum_in)
+
+STRING(REPLACE
+ "_t_get_type"
+ "_get_type"
+ enum_out_tmp
+ "${enum_in}"
+ )
+
+STRING(REPLACE
+ "_T ("
+ " ("
+ enum_out
+ "${enum_out_tmp}"
+ )
+
+FILE(WRITE ${ENUM_OUTPUT_SRC} "${enum_out}")
+FILE(REMOVE ${ENUM_INPUT_SRC})
\ No newline at end of file |