A possible follow-up might be to consistently use kcoreaddons_add_plugin for things (and perhaps give it a new argument OUTPUT_NAME, so one does not have to still manually call set_target_properties oneself while passing other related info to the first macro.