[Issue #77] Fixed msgmerge being called with --lang on versions <=0.17 by cmake.
This commit is contained in:
parent
7fa0b6580b
commit
cb9d702f06
1 changed files with 22 additions and 6 deletions
|
@ -252,13 +252,29 @@ macro(GettextTranslate)
|
|||
|
||||
else()
|
||||
|
||||
add_custom_target(${PO_TARGET}
|
||||
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
|
||||
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
|
||||
-o ${PO_FILE_NAME}.new
|
||||
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
|
||||
DEPENDS ${TEMPLATE_FILE_ABS}
|
||||
execute_process(
|
||||
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE MSGMERGE_VERSION_MSG
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" MSGMERGE_VERSION "${MSGMERGE_VERSION_MSG}")
|
||||
|
||||
if ("${MSGMERGE_VERSION}" VERSION_GREATER "0.17")
|
||||
add_custom_target(${PO_TARGET}
|
||||
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
|
||||
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
|
||||
-o ${PO_FILE_NAME}.new
|
||||
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
|
||||
DEPENDS ${TEMPLATE_FILE_ABS}
|
||||
)
|
||||
else ()
|
||||
add_custom_target(${PO_TARGET}
|
||||
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE}
|
||||
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
|
||||
-o ${PO_FILE_NAME}.new
|
||||
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
|
||||
DEPENDS ${TEMPLATE_FILE_ABS}
|
||||
)
|
||||
endif ()
|
||||
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue