mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
cmake fix po generation/update: msguniq.exe doesn't like dos line endings (produces broken pot files)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39913 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a1030cc599
commit
6fd4bb443e
@ -88,6 +88,8 @@ ADD_CUSTOM_COMMAND(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
|
||||
COMMAND ${LYX_PYTHON_EXECUTABLE}
|
||||
ARGS "${TOP_SRC_DIR}/development/cmake/po/cat.py" ${_py_sources} > "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
|
||||
COMMAND ${LYX_PYTHON_EXECUTABLE}
|
||||
ARGS "${TOP_SRC_DIR}/development/cmake/po/dos2unix.py" "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
|
||||
DEPENDS ${_py_sources}
|
||||
)
|
||||
|
||||
@ -141,12 +143,23 @@ endforeach(_pofile)
|
||||
|
||||
set(LYX_UPDATED_PO_FILES)
|
||||
foreach(_pofile ${LYX_BASE_PO_FILES})
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${_pofile} ${LYX_DEST_PO}/${_pofile}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${_pofile}.copied
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
|
||||
)
|
||||
if(WIN32)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied
|
||||
COMMAND ${LYX_PYTHON_EXECUTABLE}
|
||||
ARGS "${TOP_SRC_DIR}/development/cmake/po/unix2dos.py" "${CMAKE_CURRENT_BINARY_DIR}/${_pofile}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${_pofile} ${LYX_DEST_PO}/${_pofile}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${_pofile}.copied
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${_pofile} ${LYX_DEST_PO}/${_pofile}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${_pofile}.copied
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
|
||||
)
|
||||
endif()
|
||||
list(APPEND LYX_UPDATED_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied)
|
||||
endforeach(_pofile)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user