summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-07 15:50:04 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-10 16:11:04 +0200
commita331fb701683779d4113c39243f39ffad28cb912 (patch)
treea32c9ca38b010d54d3f168daf04e9f0f5d041194
parent672aa8d90ee1797d74aa3f8fcedc840f578f1d1b (diff)
CMake: Translations: Write a .po file before writing a .mo file
This makes debugging things easier. Gbp-Dch: ignore
-rw-r--r--CMake/Translations.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake
index 64f5886fb..a26bf1c17 100644
--- a/CMake/Translations.cmake
+++ b/CMake/Translations.cmake
@@ -42,11 +42,14 @@ function(apt_add_translation_domain domain)
set(outdir ${PROJECT_BINARY_DIR}/locale/${langcode}/LC_MESSAGES)
file(MAKE_DIRECTORY ${outdir})
# Command to merge and compile the messages
- add_custom_command(OUTPUT ${outdir}/${domain}.mo
- COMMAND msgmerge -qo - ${file} ${PROJECT_BINARY_DIR}/${domain}.pot |
- msgfmt --statistics -o ${outdir}/${domain}.mo -
+ add_custom_command(OUTPUT ${outdir}/${domain}.po
+ COMMAND msgmerge -qo ${outdir}/${domain}.po ${file} ${PROJECT_BINARY_DIR}/${domain}.pot
DEPENDS ${file} ${PROJECT_BINARY_DIR}/${domain}.pot
)
+ add_custom_command(OUTPUT ${outdir}/${domain}.mo
+ COMMAND msgfmt --statistics -o ${outdir}/${domain}.mo ${outdir}/${domain}.po
+ DEPENDS ${outdir}/${domain}.po
+ )
set(mofiles ${mofiles} ${outdir}/${domain}.mo)
install(FILES ${outdir}/${domain}.mo