summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2008-10-06 15:58:52 +0200
committerDennis kasprzyk <onestone@compiz-fusion.org>2008-10-06 19:11:30 +0200
commitf235e2a766f344f426c6054b7e69a42b41c79e3b (patch)
treeda94e0502965cc7cf1a8d3c9f9eca543a682f742 /po
parent92765a6911bc9b442bc670fd6e2370454814a34d (diff)
downloadzcomp-f235e2a766f344f426c6054b7e69a42b41c79e3b.tar.gz
zcomp-f235e2a766f344f426c6054b7e69a42b41c79e3b.tar.bz2
Initial version of CMake build system.
Diffstat (limited to 'po')
-rw-r--r--po/CMakeLists.txt56
1 files changed, 56 insertions, 0 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..fb88a3a
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,56 @@
+project (po)
+
+find_program (_intltool_update intltool-update)
+mark_as_advanced (intltool_update)
+
+find_program (_xgettext xgettext)
+mark_as_advanced (_xgettext)
+
+find_program (_msgmerge msgmerge)
+mark_as_advanced (_msgmerge)
+
+find_program(_msgfmt msgfmt)
+mark_as_advanced (k3d_msgfmt)
+
+set (compiz_catalogs ${ALL_LINGUAS})
+
+set (compiz_catalog_targets)
+
+add_custom_target (nls-update-sources
+ ${_intltool_update} -m
+ WORKING_DIRECTORY ${po_SOURCE_DIR}
+)
+
+add_custom_command (
+ OUTPUT ${po_SOURCE_DIR}/compiz.pot
+ COMMAND ${_intltool_update} --gettext-package compiz --pot
+ DEPENDS POTFILES.in
+ WORKING_DIRECTORY ${po_SOURCE_DIR}
+)
+
+foreach(catalog ${compiz_catalogs})
+ add_custom_target (nls-update-${catalog}.po
+ ${_msgmerge} ${catalog} compiz -o ${catalog}.po --no-wrap
+ DEPENDS ${po_SOURCE_DIR}/${catalog}.po
+ WORKING_DIRECTORY ${po_SOURCE_DIR}
+ )
+
+ file (MAKE_DIRECTORY "${po_BINARY_DIR}/${catalog}/lc_messages")
+
+ add_custom_command (
+ OUTPUT ${po_BINARY_DIR}/${catalog}/lc_messages/compiz.mo
+ COMMAND ${_msgfmt} -c -o ${po_BINARY_DIR}/${catalog}/lc_messages/compiz.mo ${po_SOURCE_DIR}/${catalog}.po
+ DEPENDS ${po_SOURCE_DIR}/${catalog}.po
+ )
+
+ install (
+ FILES ${po_BINARY_DIR}/${catalog}/lc_messages/compiz.mo
+ DESTINATION ${datadir}/compiz/locale/${catalog}/lc_messages
+ )
+
+ set (compiz_catalog_targets ${compiz_catalog_targets} ${po_BINARY_DIR}/${catalog}/lc_messages/compiz.mo)
+endforeach(catalog)
+
+add_custom_target(nls ALL
+ DEPENDS ${po_SOURCE_DIR}/compiz.pot ${compiz_catalog_targets}
+)