summaryrefslogtreecommitdiffstats
path: root/Modules/FindGettext.cmake
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-11-16 19:53:59 (GMT)
committerAlex Neundorf <neundorf@kde.org>2011-11-16 19:53:59 (GMT)
commit65dde30dddbe495877a3ecfef5a2d0015449b69c (patch)
tree9d8762f1e23619817504f405c256d2e693ac1f75 /Modules/FindGettext.cmake
parente48fcfffa36ca34703a4c366cb96593373234faa (diff)
downloadCMake-65dde30dddbe495877a3ecfef5a2d0015449b69c.zip
CMake-65dde30dddbe495877a3ecfef5a2d0015449b69c.tar.gz
CMake-65dde30dddbe495877a3ecfef5a2d0015449b69c.tar.bz2
FindGettext: two more fixes for files with multiple dots
Another patch by Albert Astals Cid for dealing with translation files with multiple dots. Alex
Diffstat (limited to 'Modules/FindGettext.cmake')
-rw-r--r--Modules/FindGettext.cmake6
1 files 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})