]> git.lyx.org Git - lyx.git/blobdiff - po/CreateLayoutTranslations.cmake
Autotools: optimize with -Og when debugging
[lyx.git] / po / CreateLayoutTranslations.cmake
index 9f3d533e1195695b92e8a58d32dd22d1029a6d49..1eff48a734f54e6057bc10f656af2a78e0a22aed 100644 (file)
@@ -9,6 +9,7 @@
 #       -DLYX_PYTHON_EXECUTABLE=xxx \
 #       -DParType=xxx \
 #       -DSources=xxx \
+#       -DLYX_PY_POLIB=${LYX_PY_POLIB} \
 #       -P "${TOP_SRC_DIR}/po/CreateLayoutTranslations.cmake"
 
 set(_dst ${DestFile})
@@ -23,6 +24,9 @@ macro(die_if _err text)
 endmacro()
 
 message(STATUS "Starting CreateLayoutTranslations")
+if ("${LYX_PY_POLIB}" STREQUAL "")
+  message(STATUS "Missing needed pythons polib, be prepared for error")
+endif()
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${TOP_SRC_DIR}/lib/layouttranslations" "${_dst}"
   RESULT_VARIABLE _err)
 die_if(_err "Copy of layouttranslations failed")
@@ -30,7 +34,11 @@ die_if(_err "Copy of layouttranslations failed")
 execute_process(COMMAND ${LYX_PYTHON_EXECUTABLE}
   "${TOP_SRC_DIR}/po/lyx_pot.py" -b "${TOP_SRC_DIR}" -o "${_dst}" -t ${type}
   "--src_file=${_src_files}"
+  OUTPUT_VARIABLE _err_out
   RESULT_VARIABLE _err)
+if(_err)
+  message(STATUS "${_err_out}")
+endif()
 die_if(_err "Calling lyx_pot.py failed")
 
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_dst}" "${TOP_SRC_DIR}/lib/layouttranslations"