kossebau added a comment.
Thanks for review. > Can't we reuse this same code from kcoreaddons? Maybe kcoreaddons can offer a macro that does this? 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. 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): 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 ) and in the KF5PlasmaConfig.cmake.in then just need some @PACKAGE_SETUP_AUTOMOC_MACROS@ 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. REPOSITORY R242 Plasma Framework (Library) REVISION DETAIL https://phabricator.kde.org/D10732 To: kossebau, #frameworks, #build_system, apol Cc: michaelh