diff options
author | Didier Raboud <odyx@debian.org> | 2012-12-13 21:54:18 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2012-12-13 22:10:49 +0100 |
commit | 19b75e174338f8e7be7486a7445d1e90e9795077 (patch) | |
tree | fcdbf28510a1cab3ed03bf4751eab03d8b1692fe /src/po/CMakeLists.txt | |
parent | 41cacbc654eb230254c49c9f3f95f6d7f302258a (diff) | |
download | colobot-19b75e174338f8e7be7486a7445d1e90e9795077.tar.gz colobot-19b75e174338f8e7be7486a7445d1e90e9795077.tar.bz2 colobot-19b75e174338f8e7be7486a7445d1e90e9795077.zip |
Handle translations with CMakes.
closes #81
Diffstat (limited to 'src/po/CMakeLists.txt')
-rw-r--r-- | src/po/CMakeLists.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/po/CMakeLists.txt b/src/po/CMakeLists.txt new file mode 100644 index 0000000..02a4d37 --- /dev/null +++ b/src/po/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 2.8) + +SET(_potFile colobot.pot) + +# TODO: Use a finder +SET(XGETTEXT_CMD /usr/bin/xgettext) + +find_package(Gettext REQUIRED) + +ADD_CUSTOM_COMMAND(OUTPUT ${_potFile} + COMMAND ${XGETTEXT_CMD} ../app/app.cpp --output=${_potFile} + COMMAND ${XGETTEXT_CMD} ../common/restext_strings.c --output=${_potFile} --join-existing --extract-all --no-location + + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Extract translatable messages to ${_potFile}" +) + +ADD_CUSTOM_TARGET(_${potFile} ${_all} +DEPENDS ${_potFile} +) + +FILE(GLOB _poFiles *.po) + +GETTEXT_CREATE_TRANSLATIONS(${_potFile} ALL ${_poFiles}) |