D5143: Introduce fetch-translations build command

Harald Sitter noreply at phabricator.kde.org
Tue Mar 28 06:40:44 UTC 2017


sitter added a comment.


  Oh! OTOH, given fetch-translations pulls it into bin_dir while normally we'd have it in src_dir this may well be awkward in implementation. e.g. https://phabricator.kde.org/D5197 effectively ought to be
  
    ki18n_install("${CMAKE_SOURCE_DIR}/po")
    ki18n_install("${CMAKE_BINARY_DIR}/po")
  
  this gets funnier with frameworks as they have a conditional wrapping the src_dir version
  
    if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
        ki18n_install(po)
        kdoctools_install(po)
    endif()
    ki18n_install(${CMAKE_BINARY_DIR}/po)
  
  While the manual call is more explicit and thus obvious it also makes a reader who doesn't know about fetch-translations go "WHAT?!?" so I'd actually argue that the bin_dir call needs a comment explaining why double-ki18n_install calls are a thing... in every single project that gets the ki18n_install call.
  Maybe we can live it, but personally I find it a bit egh. I'd find it nicer if ki18n_install simply finds the right po dir. If src_dir has one, use that, if bin_dir has one, use that, if neither has one give up (specifying an absolute path would bypass this of course).
  
  Food for thought.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D5143

To: apol, #frameworks, #build_system, kfunk, ltoscano, aacid
Cc: sitter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20170328/bd5be3b6/attachment-0001.html>


More information about the Kde-buildsystem mailing list