<table><tr><td style="">sitter added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5143" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>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. <a href="https://phabricator.kde.org/D5197" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D5197</a> effectively ought to be</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">ki18n_install("${CMAKE_SOURCE_DIR}/po")
ki18n_install("${CMAKE_BINARY_DIR}/po")</pre></div>
<p>this gets funnier with frameworks as they have a conditional wrapping the src_dir version</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
ki18n_install(po)
kdoctools_install(po)
endif()
ki18n_install(${CMAKE_BINARY_DIR}/po)</pre></div>
<p>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.<br />
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).</p>
<p>Food for thought.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R240 Extra CMake Modules</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5143" rel="noreferrer">https://phabricator.kde.org/D5143</a></div></div><br /><div><strong>To: </strong>apol, Frameworks, Build System, kfunk, ltoscano, aacid<br /><strong>Cc: </strong>sitter<br /></div>