]> git.lyx.org Git - lyx.git/blobdiff - po/CMakeLists.txt
Fix preview with a nested preview not being shown (#10795)
[lyx.git] / po / CMakeLists.txt
index e690e40472fd40ee5aaadbc9ef2576251b7b1a39..311c2eace8cead3709d0a4d4d09e6671d9b2e4f0 100755 (executable)
@@ -12,8 +12,6 @@ include_directories(${TOP_SRC_DIR}/po)
 SET(_lyxname ${PACKAGE})
 SET(_py_sources)
 
-# Idea stolen from http://public.kitware.com/pipermail/cmake/2011-January/041666.html
-
 macro(add_gettext_python  _par _dir)
   set(_sources)
   foreach(_arg ${ARGN})
@@ -45,7 +43,10 @@ macro(add_gettext_python  _par _dir)
   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" REQUIRED)
+    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
@@ -55,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}"
@@ -86,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/*.citeengines)
 
 ADD_CUSTOM_COMMAND(
     OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"