Catalog names with dots not installed properly by CMAKE

Albert Astals Cid aacid at kde.org
Mon Nov 14 18:49:08 UTC 2011


A Dilluns, 7 de novembre de 2011, Albert Astals Cid vàreu escriure:
> CC'in kde-buildsystem since they are the cmake gurus.
> 
> A Dilluns, 7 de novembre de 2011, Burkhard Lück vàreu escriure:
> > Hi,
> > 
> > trunk has these catalognames with dots:
> > 
> > playground-multimedia/plasma_applet_org.kde.mediacontainment.po
> > installed as plasma_applet_org.mo
> > 
> > playground-base/plasma_applet_org.kde.active.activityscreen.po
> > installed as plasma_applet_org.mo
> > 
> > playground-base/plasma_package_org.kde.activityswitcher.po
> > installed as plasma_package_org.mo
> > 
> > This bug is already reported here:
> > get_filename_component interprets first period (.) as start of extension
> > (EXT)
> > http://cmake.org/Bug/bug_relationship_graph.php?bug_id=12282&graph=relat
> > ion
> > 
> > Afaik this issue is still not fixed in the latest release of cmake.
> > 
> > Installation fails silently, so do we need to add a workaround from the
> > bug report to kdelibs/cmake/modules/FindGettext.cmake?
> 
> It seems that fixing kdelibs/cmake/modules/FindGettext.cmake should not be
> that difficult. Alex and other cmake people what do you think?

Noone cares that we fail to properly install files?

I've come up with this patch, anyone against it?

diff --git a/cmake/modules/FindGettext.cmake b/cmake/modules/FindGettext.cmake                                                                                                                                                                                                 
index e35dced..b15f0b4 100644                                                                                                                                                                                                                                                  
--- a/cmake/modules/FindGettext.cmake                                                                                                                                                                                                                                          
+++ b/cmake/modules/FindGettext.cmake                                                                                                                                                                                                                                          
@@ -213,7 +213,8 @@ MACRO(GETTEXT_PROCESS_PO_FILES _lang)                                                                                                                                                                                                                      
 #    message(STATUS "2 all ${_addToAll} dest ${_installDest} args: ${_args}")                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                               
    FOREACH(_current_PO_FILE ${_args})                                                                                                                                                                                                                                         
-      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}

Albert

> 
> Albert
> 
> > --
> > Burkhard Lück


More information about the Kde-buildsystem mailing list