parent
41cacbc654
commit
19b75e1743
|
@ -4,6 +4,8 @@ add_subdirectory(CBot)
|
|||
# Tools directory is built separately
|
||||
add_subdirectory(tools)
|
||||
|
||||
add_subdirectory(po)
|
||||
|
||||
# Tests
|
||||
if(${TESTS})
|
||||
add_subdirectory(common/test)
|
||||
|
|
|
@ -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})
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue