build: Add a CMake target Config.

Authored by lepagevalleeemmanuel on Dec 13 2018, 1:58 AM.

Description

build: Add a CMake target Config.

Also fix using the installed target both as .so and .a

The main.cpp should contain

#ifdef KQUICKITEMVIEWS_USE_STATIC_PLUGIN
Q_IMPORT_PLUGIN(KQuickItemViews)
#else
#include <KQuickItemViews/plugin.h>
#endif

and

#ifdef KQUICKITEMVIEWS_USE_STATIC_PLUGIN

qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_KQuickItemViews().instance())->registerTypes("org.kde.playground.kquickitemviews");

#else

KQuickItemViews v;
v.registerTypes("org.kde.playground.kquickitemviews");

#endif

Details

Committed
lepagevalleeemmanuelDec 13 2018, 3:34 AM
Parents
R1027:c09a0e67721a: build: Add support for system wide shared libraries.
Branches
Unknown
Tags
Unknown