commit 6fe29e99460b34bc7fa6962f4b78940d78cfef7b
Author: Kornel Benko <kor...@lyx.org>
Date:   Wed Jun 6 17:03:12 2018 +0200

    Cmake build: make editing of po-files on unix easier
    
    Editing created po-file with a lokalization program like "linguist"
    needs a hint to find the referenced sources.
    Creating symbolic links helps.
---
 po/CMakeLists.txt |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 0e4cc61..54d6019 100755
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -86,6 +86,15 @@ endmacro(add_gettext_python)
 SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot" 
GENERATED)
 SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" 
GENERATED)
 SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot" 
GENERATED)
+if (UNIX)
+  # create symbolic links for external lokalizations programs
+  # to be able to find the referenced sources if used on
+  # built po-files
+  foreach (_dir lib src)
+    execute_process(
+      COMMAND ${CMAKE_COMMAND} -E create_symlink "${TOP_SRC_DIR}/${_dir}" 
"${CMAKE_CURRENT_BINARY_DIR}/${_dir}")
+  endforeach()
+endif()
 
 add_gettext_python(qt4 src/frontends/qt4/ui *.ui)
 add_gettext_python(layouts lib layouts/*.layout layouts/*.inc layouts/*.module 
citeengines/*.citeengine)

Reply via email to