]> git.lyx.org Git - lyx.git/blobdiff - po/CMakeLists.txt
Update doc (semantics of "graphique" in French)
[lyx.git] / po / CMakeLists.txt
index 3ec0febf53b890c547e562bbb0fb0b4e6c8832b8..4b04d6ac9c7d3d2e51c151f8b6d8833717d15234 100755 (executable)
@@ -11,6 +11,7 @@ include_directories(${TOP_SRC_DIR}/po)
 
 SET(_lyxname ${PACKAGE})
 SET(_py_sources)
+
 macro(add_gettext_python  _par _dir)
   set(_sources)
   foreach(_arg ${ARGN})
@@ -40,6 +41,12 @@ macro(add_gettext_python  _par _dir)
     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
@@ -49,6 +56,7 @@ macro(add_gettext_python  _par _dir)
        "-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}"
@@ -80,14 +88,14 @@ 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 lib layouts/*.layout layouts/*.inc layouts/*.module citeengines/*.citeengine)
 add_gettext_python(languages lib languages)
 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)
+add_gettext_python(layouttranslations lib layouts/*.layout layouts/*.inc layouts/*.module citeengines/*.citeengine)
 
 ADD_CUSTOM_COMMAND(
     OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"