aboutsummaryrefslogtreecommitdiff
path: root/cmake/RunMsgfmt.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/RunMsgfmt.cmake')
-rw-r--r--cmake/RunMsgfmt.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/RunMsgfmt.cmake b/cmake/RunMsgfmt.cmake
new file mode 100644
index 0000000000..51606338e0
--- /dev/null
+++ b/cmake/RunMsgfmt.cmake
@@ -0,0 +1,9 @@
+set(ENV{OLD_PO_FILE_INPUT} yes)
+
+execute_process(
+ COMMAND ${MSGFMT_PRG} -o ${MO_FILE} ${PO_FILE}
+ ERROR_VARIABLE err
+ RESULT_VARIABLE res)
+if(NOT res EQUAL 0)
+ message(FATAL_ERROR "msgfmt failed to run correctly: ${err}")
+endif()