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.
This commit is contained in:
Kornel Benko 2018-06-06 17:03:12 +02:00
parent fb849d2f76
commit 6fe29e9946

View File

@ -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)