SET(_lyxname ${PACKAGE})
SET(_py_sources)
+
macro(add_gettext_python _par _dir)
set(_sources)
foreach(_arg ${ARGN})
DEPENDS ${_tmp_src_files}
)
if (${_par} MATCHES "layouttranslations")
+ # lyx_pot.py requires the module "polib" if using target layouttranslations1,
+ # so we have to check for it
+ find_python_module("polib")
+ if ("${LYX_PY_POLIB}" STREQUAL "")
+ message(STATUS "You will be unable to update layouttranslations file")
+ endif()
ADD_CUSTOM_COMMAND(
OUTPUT "${_dst}"
PRE_BUILD
"-DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}"
"-DParType=${_par1}"
"-DSources=${_src_files}"
+ "-DLYX_PY_POLIB=${LYX_PY_POLIB}"
-P "${TOP_SRC_DIR}/po/CreateLayoutTranslations.cmake"
DEPENDS ${_sources} ${_src_files} "${TOP_SRC_DIR}/lib/layouttranslations"
COMMENT "${LYX_PYTHON_EXECUTABLE} ${TOP_SRC_DIR}/po/lyx_pot.py -b ${TOP_SRC_DIR} -o ${_dst} -t ${_par1} --src_file=${_src_files}"
add_gettext_python(latexfonts lib latexfonts)
add_gettext_python(encodings lib encodings)
add_gettext_python(ui lib/ui *.ui *.inc)
-add_gettext_python(external lib external_templates)
+add_gettext_python(external lib/xtemplates *.xtemplate)
add_gettext_python(formats lib configure.py)
add_gettext_python(layouttranslations lib/layouts *.layout *.inc *.module)