From 65dde30dddbe495877a3ecfef5a2d0015449b69c Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Wed, 16 Nov 2011 20:53:59 +0100 Subject: FindGettext: two more fixes for files with multiple dots Another patch by Albert Astals Cid for dealing with translation files with multiple dots. Alex --- Modules/FindGettext.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake index ffe3f26..c44adb4 100644 --- a/Modules/FindGettext.cmake +++ b/Modules/FindGettext.cmake @@ -52,7 +52,8 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg) SET(_firstPoFile "${_firstPoFileArg}") SET(_gmoFiles) - GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE) + GET_FILENAME_COMPONENT(_potName ${_potFile} NAME) + STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName}) GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE) SET(_addToAll) @@ -92,7 +93,8 @@ FUNCTION(GETTEXT_PROCESS_POT_FILE _potFile) CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE) + GET_FILENAME_COMPONENT(_potName ${_potFile} NAME) + STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName}) GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE) FOREACH (_lang ${_parsedArguments_LANGUAGES}) -- cgit v0.12