summaryrefslogtreecommitdiffstats
path: root/po/CMakeLists.txt
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-06-22 01:11:37 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2013-06-22 01:17:19 +0200
commitbfcce26f8949f4ba42cc1bd8203dff51884aa0da (patch)
treed53c83fa8079952a9226589caf98075cd0623958 /po/CMakeLists.txt
parent1377e48910c1bef1829c67740360b0a8309239a1 (diff)
downloadcolobot-bfcce26f8949f4ba42cc1bd8203dff51884aa0da.tar.gz
colobot-bfcce26f8949f4ba42cc1bd8203dff51884aa0da.tar.bz2
colobot-bfcce26f8949f4ba42cc1bd8203dff51884aa0da.zip
Changes in build organization
* targets are now created in top-level build directory * more things are now configured through CMake options * changed debug build detection from NDEBUG to DEV_BUILD * moved po and desktop directories * moved last unit test out of src directory
Diffstat (limited to 'po/CMakeLists.txt')
-rw-r--r--po/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..22393f9
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,19 @@
+cmake_minimum_required(VERSION 2.8)
+
+set(_potFile colobot.pot)
+
+find_program(XGETTEXT_CMD xgettext)
+
+add_custom_command(OUTPUT ${_potFile}
+ COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/app/app.cpp --output=${_potFile}
+ COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/common/restext.cpp --output=${_potFile} --join-existing --extract-all --no-location
+
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMENT "Extract translatable messages to ${_potFile}"
+)
+
+add_custom_target(update-pot DEPENDS ${_potFile})
+
+file(GLOB _poFiles *.po)
+gettext_create_translations(${_potFile} ALL ${_poFiles})
+