From c313084ef59365b5e2713b19e81695c1b6a6ae7f Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Wed, 25 Mar 2009 06:49:49 +0000 Subject: [PATCH] Avoid modification of po-files in source tree git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28888 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/po/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/development/cmake/po/CMakeLists.txt b/development/cmake/po/CMakeLists.txt index 85f631b469..cd9dfae81b 100755 --- a/development/cmake/po/CMakeLists.txt +++ b/development/cmake/po/CMakeLists.txt @@ -79,7 +79,16 @@ ADD_CUSTOM_COMMAND( DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" ${_potfiles_dep} ) -file(GLOB LYX_PO_FILES ${TOP_SRC_DIR}/po/*.po) +# +# We have to copy the po-files first, +# otherwise they would be modified (inside the macro GETTEXT_CREATE_TRANSLATIONS()) +# This makes the "svn up" on po-files work again +file(GLOB LYX_BASE_PO_FILES RELATIVE ${TOP_SRC_DIR}/po ${TOP_SRC_DIR}/po/*.po) +set(LYX_PO_FILES) +foreach(_pofile ${LYX_BASE_PO_FILES}) + configure_file(${TOP_SRC_DIR}/po/${_pofile} ${CMAKE_CURRENT_BINARY_DIR}/${_pofile} COPYONLY) + list(APPEND LYX_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}) +endforeach(_pofile) GETTEXT_CREATE_TRANSLATIONS(${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot ALL ${LYX_PO_FILES}) -- 2.39.2