-make GETTEXT_PROCESS_PO_FILES() work with files with multiple dots

Patch by Albert Astals Cid.
E.g. plasma_package_org.kde.activityswitcher.po will now be installed
correctly as plasma_package_org.kde.activityswitcher.mo, and not as
plasma_package_org.mo.

This is kind-of related to #12282

Alex
This commit is contained in:
Alex Neundorf 2011-11-15 18:49:47 +01:00
parent ecb4459e31
commit e48fcfffa3
1 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,8 @@ FUNCTION(GETTEXT_PROCESS_PO_FILES _lang)
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
FOREACH(_current_PO_FILE ${_parsedArguments_PO_FILES})
GET_FILENAME_COMPONENT(_basename ${_current_PO_FILE} NAME_WE)
GET_FILENAME_COMPONENT(_name ${_current_PO_FILE} NAME)
STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name})
SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
ADD_CUSTOM_COMMAND(OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}