[lookandfeel kcm] Do not declare plugin in lookandfeeltool code version, v2

Authored by kossebau on Feb 17 2018, 3:54 PM.

Description

[lookandfeel kcm] Do not declare plugin in lookandfeeltool code version, v2

Summary:
Also improves race condition on creating the JSON file and running
automoc over the cpp file which refers to it, given there is no
dependency chain defined at all for the lookandfeeltool target and
that kcm_lookandfeel.json, which was prone to make highly parallel
builds fail

Moving the K_PLUGIN_FACTORY_WITH_JSON into a separate file only added
to the sources of kcm_lookandfeel, instead of hiding with an ifndef for
the build of the lookandfeeltool target as tried before, should avoid
any potential confusion of automoc as reported from some builds
(on KDE neon?).

Reviewers: FreeBSD, tcberner, bshah, mart, davidedmundson

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D10607