cmake: Use the official CMake variable for building as a static plugin.

Authored by mart on Jan 19 2018, 10:21 AM.

Description

cmake: Use the official CMake variable for building as a static plugin.

Summary:
This is the first step in actually creating a valid Qt static plugin.

Currently, when used as a static library, it is expected to be a
subdirectory of the project instead of a "proper" Qt plugin. This
patch and the ones that follow aim to make Kirigami a plugin just
as Qt official ones.

Test Plan:
builds and works in both modes, however KirigamiPlugin::registerTypes()
still seems to be needed, which we want to get rid of in the end

Reviewers: Kirigami, lepagevalleeemmanuel

Subscribers: apol, plasma-devel

Tags: Kirigami

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

Details