kcoreaddons_add_plugin: Automatically set JSON file as dependency
Automatically set the JSON file as a dependency if there is only one in the current source dir. This is often the case each plugin is in its own subdir.
Currently the kcoreaddons_desktop_to_json utility is used a lot, which automatically adds the AUTOGEN_TARGET_DEPENDS for the target that is passed in. But that should be ported away from, see https://phabricator.kde.org/T14564.
Explicitly defining the JSON file would be more work and also cause the function call to get longer, especially if the namespace and sources are passed in too.