The po-files created with "make update_po_files" differs from their
counterparts in automake. Especially the last part starting with fuzzy
translations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34930
a592a061-630c-0410-9148-
cb99ea01b6c8
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in "")
file(GLOB_RECURSE _tmp_potfiles RELATIVE ${TOP_SRC_DIR}/ ${TOP_SRC_DIR}/src/*.h ${TOP_SRC_DIR}/src/*.cpp ${TOP_SRC_DIR}/src/*.cpp.in)
list(SORT _tmp_potfiles)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in "")
file(GLOB_RECURSE _tmp_potfiles RELATIVE ${TOP_SRC_DIR}/ ${TOP_SRC_DIR}/src/*.h ${TOP_SRC_DIR}/src/*.cpp ${TOP_SRC_DIR}/src/*.cpp.in)
list(SORT _tmp_potfiles)
-#list(REMOVE_ITEM _tmp_potfiles src/support/Package.cpp)
+list(REMOVE_ITEM _tmp_potfiles src/support/Package.cpp)
foreach(_f ${_tmp_potfiles})
# we don't need to select only relevant files because the outcome of xgettext
foreach(_f ${_tmp_potfiles})
# we don't need to select only relevant files because the outcome of xgettext
set(LYX_PO_FILES)
SET(LYX_UPDATED_PO_FILES)
SET(LYX_DEST_PO ${TOP_SRC_DIR}/po)
set(LYX_PO_FILES)
SET(LYX_UPDATED_PO_FILES)
SET(LYX_DEST_PO ${TOP_SRC_DIR}/po)
foreach(_pofile ${LYX_BASE_PO_FILES})
add_custom_command(
foreach(_pofile ${LYX_BASE_PO_FILES})
add_custom_command(
list(APPEND LYX_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile})
endforeach(_pofile)
list(APPEND LYX_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile})
endforeach(_pofile)
-foreach(_pofile ${LYX_BASE_PO_FILES} ${_lyxname}.pot)
+foreach(_pofile ${LYX_BASE_PO_FILES})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied
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 ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied
+ COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} ${_pofile} ${_lyxname}.pot -o ${_pofile}.copied
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied ${LYX_DEST_PO}/${_pofile}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
)
list(APPEND LYX_UPDATED_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied)
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
)
list(APPEND LYX_UPDATED_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied)
# ALL omitted here, to prevent from automatic creation
ADD_CUSTOM_TARGET(update_po_files DEPENDS ${LYX_UPDATED_PO_FILES})
# ALL omitted here, to prevent from automatic creation
ADD_CUSTOM_TARGET(update_po_files DEPENDS ${LYX_UPDATED_PO_FILES})
+add_dependencies(update_po_files translations)