summaryrefslogtreecommitdiff
path: root/po/CMakeLists.txt
diff options
context:
space:
mode:
authorKim Kibum <kb0929.kim@samsung.com>2012-06-08 14:53:52 +0900
committerKim Kibum <kb0929.kim@samsung.com>2012-06-08 14:53:52 +0900
commitca861ba7b3f14b22fe5b53131c93399a87e68e90 (patch)
tree50eb42707c28bda3c8fc0ec3231e27839f17e45b /po/CMakeLists.txt
parentee54cf2cefee179673d821d800ea5ec599ad0975 (diff)
downloadbrowser-ca861ba7b3f14b22fe5b53131c93399a87e68e90.tar.gz
browser-ca861ba7b3f14b22fe5b53131c93399a87e68e90.tar.bz2
browser-ca861ba7b3f14b22fe5b53131c93399a87e68e90.zip
apply FSL(Flora Software License)
Diffstat (limited to 'po/CMakeLists.txt')
-rwxr-xr-xpo/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100755
index 00000000..3d2288f7
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,24 @@
+# for i18n
+
+SET(POFILES en.po ja_JP.po ko_KR.po zh_CN.po de_DE.po el_GR.po es_ES.po fr_FR.po it_IT.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_HK.po zh_TW.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 ${LOCALE_DIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})