<table><tr><td style="">kossebau 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/D10732" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Thanks for review.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Can't we reuse this same code from kcoreaddons? Maybe kcoreaddons can offer a macro that does this?</p></blockquote>

<p>As hinted in the commit message, plan is to have some ECM macro instead, but only for 5.45 in a month, to not hurry macro signature design. Soon up for discussion though.</p>

<p>Current draft/working prototype results in code like the following for CMakeLists.txt (replacing the complete current code to set up things with CMAKE_AUTOMOC_MACRO_NAMES & :CMAKE_AUTOMOC_DEPEND_FILTERS):</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);">include(ECMSetupQtPluginMacros)

ecm_setup_qtplugin_macros(
    JSON_NONE
        "K_EXPORT_PLASMA_SERVICE"
        "K_EXPORT_PLASMA_APPLET"
        "K_EXPORT_PLASMA_PACKAGE"
        "K_EXPORT_PLASMA_APPLETSCRIPTENGINE"
        "K_EXPORT_PLASMA_DATAENGINESCRIPTENGINE"
        "K_EXPORT_PLASMA_DATAENGINE"
    JSON_ARG2
        "K_EXPORT_PLASMA_PACKAGE_WITH_JSON"
    JSON_ARG3
        "K_EXPORT_PLASMA_SERVICE_WITH_JSON"
        "K_EXPORT_PLASMA_APPLET_WITH_JSON"
        "K_EXPORT_PLASMA_APPLETSCRIPTENGINE_WITH_JSON"
        "K_EXPORT_PLASMA_DATAENGINESCRIPTENGINE_WITH_JSON"
        "K_EXPORT_PLASMA_CONTAINMENTACTIONS_WITH_JSON"
        "K_EXPORT_PLASMA_DATAENGINE_WITH_JSON"
    CONFIG_VARIABLE
         PACKAGE_SETUP_AUTOMOC_MACROS
)</pre></div>

<p>and in the KF5PlasmaConfig.cmake.in then just need some</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);">@PACKAGE_SETUP_AUTOMOC_MACROS@</pre></div>

<p>The complete code copies as now in the patch are just a temporary solution by purpose, to already fix the issue, but without rushed new public API.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10732" rel="noreferrer">https://phabricator.kde.org/D10732</a></div></div><br /><div><strong>To: </strong>kossebau, Frameworks, Build System, apol<br /><strong>Cc: </strong>michaelh<br /></div>