summaryrefslogtreecommitdiff
path: root/ug-wifidirect/po/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'ug-wifidirect/po/CMakeLists.txt')
-rw-r--r--ug-wifidirect/po/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/ug-wifidirect/po/CMakeLists.txt b/ug-wifidirect/po/CMakeLists.txt
new file mode 100644
index 0000000..55ae9ee
--- /dev/null
+++ b/ug-wifidirect/po/CMakeLists.txt
@@ -0,0 +1,24 @@
+# for i18n
+
+SET(POFILES en.po en_GB.po ko_KR.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE("PO: ${pofile}")
+ GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+ SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${moFile}
+ COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+ DEPENDS ${absPofile}
+ )
+ INSTALL(FILES ${moFile}
+ DESTINATION /opt/ug/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})