Move pot-update dependencies in a separate file.
This allows to move the po4a update tools in the same file and keep the dependencies better together.
This commit is contained in:
parent
350b11198c
commit
14db2d8b01
3 changed files with 38 additions and 22 deletions
|
@ -220,6 +220,10 @@ if(USE_ANA_NETWORK)
|
|||
find_package( Boost 1.35 REQUIRED COMPONENTS system )
|
||||
endif(USE_ANA_NETWORK)
|
||||
|
||||
if(ENABLE_POT_UPDATE_TARGET)
|
||||
find_package(TranslationTools REQUIRED)
|
||||
endif(ENABLE_POT_UPDATE_TARGET)
|
||||
|
||||
# get languages
|
||||
file(READ po/LINGUAS LINGUAS)
|
||||
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
|
||||
|
|
34
cmake/FindTranslationTools.cmake
Normal file
34
cmake/FindTranslationTools.cmake
Normal file
|
@ -0,0 +1,34 @@
|
|||
# - Find the tools needed for updating the potfiles and translations
|
||||
|
||||
set(TRANSLATION_TOOLS_FOUND true)
|
||||
|
||||
find_program(GETTEXT_MSGINIT_EXECUTABLE msginit)
|
||||
if(NOT GETTEXT_MSGINIT_EXECUTABLE)
|
||||
message("msginit not found")
|
||||
set(TRANSLATION_TOOLS_FOUND false)
|
||||
endif(NOT GETTEXT_MSGINIT_EXECUTABLE)
|
||||
|
||||
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
|
||||
if(NOT GETTEXT_XGETTEXT_EXECUTABLE )
|
||||
message("xgettext not found")
|
||||
set(TRANSLATION_TOOLS_FOUND false)
|
||||
endif(NOT GETTEXT_XGETTEXT_EXECUTABLE )
|
||||
|
||||
find_program(GETTEXT_MSGCAT_EXECUTABLE msgcat)
|
||||
if(NOT GETTEXT_MSGCAT_EXECUTABLE )
|
||||
message("msgcat not found")
|
||||
set(TRANSLATION_TOOLS_FOUND false)
|
||||
endif(NOT GETTEXT_MSGCAT_EXECUTABLE )
|
||||
|
||||
find_program(GETTEXT_MSGATTRIB_EXECUTABLE msgattrib)
|
||||
if(NOT GETTEXT_MSGATTRIB_EXECUTABLE)
|
||||
message("msgattrib not found")
|
||||
set(TRANSLATION_TOOLS_FOUND false)
|
||||
endif(NOT GETTEXT_MSGATTRIB_EXECUTABLE)
|
||||
|
||||
if(NOT TRANSLATION_TOOLS_FOUND)
|
||||
if(TranslationTools_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Not all translation tools are found")
|
||||
endif(TranslationTools_FIND_REQUIRED)
|
||||
endif(NOT TRANSLATION_TOOLS_FOUND)
|
||||
|
|
@ -50,28 +50,6 @@ set(DOMAINS
|
|||
# If a source file has not GETTEXT_DOMAIN it belongs to this domain.
|
||||
set(DEFAULT_DOMAIN wesnoth)
|
||||
|
||||
############ Validation. ###########
|
||||
|
||||
find_program(GETTEXT_MSGINIT_EXECUTABLE msginit)
|
||||
if(NOT GETTEXT_MSGINIT_EXECUTABLE)
|
||||
message(FATAL_ERROR "msginit not found")
|
||||
endif(NOT GETTEXT_MSGINIT_EXECUTABLE)
|
||||
|
||||
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
|
||||
if(NOT GETTEXT_XGETTEXT_EXECUTABLE )
|
||||
message(FATAL_ERROR "xgettext not found")
|
||||
endif(NOT GETTEXT_XGETTEXT_EXECUTABLE )
|
||||
|
||||
find_program(GETTEXT_MSGCAT_EXECUTABLE msgcat)
|
||||
if(NOT GETTEXT_MSGCAT_EXECUTABLE )
|
||||
message(FATAL_ERROR "msgcat not found")
|
||||
endif(NOT GETTEXT_MSGCAT_EXECUTABLE )
|
||||
|
||||
find_program(GETTEXT_MSGATTRIB_EXECUTABLE msgattrib)
|
||||
if(NOT GETTEXT_MSGATTRIB_EXECUTABLE)
|
||||
message(FATAL_ERROR "msgattrib not found")
|
||||
endif(NOT GETTEXT_MSGATTRIB_EXECUTABLE)
|
||||
|
||||
set(WMLXGETTEXT ${PROJECT_SOURCE_DIR}/utils/wmlxgettext)
|
||||
|
||||
############ pot update. ###########
|
||||
|
|
Loading…
Add table
Reference in a new issue