Copy po-files only if realy changed.

Avoids annoying po re-building.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29243 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Kornel Benko 2009-04-15 07:14:29 +00:00
parent d7cbf4da8b
commit 6f5ac86d6e

View File

@ -90,7 +90,11 @@ ADD_CUSTOM_COMMAND(
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)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_SRC_DIR}/po/${_pofile} ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
DEPENDS ${TOP_SRC_DIR}/po/${_pofile}
)
list(APPEND LYX_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile})
endforeach(_pofile)