This is a try to shorten the length of the command line when creating

..._l10n.pot files.
(The line-length on Windows should not exceed 0x8000 bytes)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29517 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Kornel Benko 2009-05-03 17:59:01 +00:00
parent f4c0f80857
commit 5ed63945f7

View File

@ -18,11 +18,16 @@ macro(add_gettext_python _par _dir)
list(APPEND _sources ${_s1})
endforeach(_arg)
SET(_dst "${CMAKE_CURRENT_BINARY_DIR}/${_par}_l10n.pot")
if(${_par} MATCHES "^\(.*\)_[0-9]+$")
set(_par1 ${CMAKE_MATCH_1})
else()
set(_par1 ${_par})
endif()
ADD_CUSTOM_COMMAND(
OUTPUT "${_dst}"
PRE_BUILD
COMMAND python
ARGS "${TOP_SRC_DIR}/po/lyx_pot.py" -b "${TOP_SRC_DIR}" -o "${_dst}" -t ${_par} ${_sources}
ARGS "${TOP_SRC_DIR}/po/lyx_pot.py" -b "${TOP_SRC_DIR}" -o "${_dst}" -t ${_par1} ${_sources}
DEPENDS ${_sources}
)
SET_SOURCE_FILES_PROPERTIES("${_dst}" GENERATED)
@ -34,10 +39,13 @@ SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" GE
SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot" GENERATED)
add_gettext_python(qt4 src/frontends/qt4/ui *.ui)
add_gettext_python(layouts lib/layouts *.layout *.inc *.module)
add_gettext_python(layouts_1 lib/layouts *.layout)
add_gettext_python(layouts_2 lib/layouts *.inc)
add_gettext_python(layouts_3 lib/layouts *.module)
add_gettext_python(languages lib languages)
add_gettext_python(encodings lib encodings)
add_gettext_python(ui lib/ui *.ui *.inc)
add_gettext_python(ui_1 lib/ui *.ui)
add_gettext_python(ui_2 lib/ui *.inc)
add_gettext_python(external lib external_templates)
add_gettext_python(formats lib configure.py)