summaryrefslogtreecommitdiffstats
path: root/src/po/CMakeLists.txt
blob: 3b26571f86b10df5101f7e6bc306be8bb0ecd3df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cmake_minimum_required(VERSION 2.8)

set(_potFile colobot.pot)

find_program(XGETTEXT_CMD xgettext)

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})