Add support for uninstalled plugins in kcoreaddons_add_plugin

Authored by elvisangelaccio on Aug 16 2017, 1:48 PM.

Description

Add support for uninstalled plugins in kcoreaddons_add_plugin

If find_package(ECM 5.38) or higher was called, output the plugin in an
INSTALL_NAMESPACE subfolder of the "bin" folder.

This way users of the kcoreaddons_add_plugin macro don't have to manually
set the LIBRARY_OUTPUT_DIRECTORY target property (in order to make the
plugin work even if uninstalled).

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