-
Notifications
You must be signed in to change notification settings - Fork 1
Custom plugin
Jiří Fatka edited this page Sep 5, 2016
·
3 revisions
It's possible to write a custom plugin, there is a short tutorial how to do it.
At first it's recommended to have cloned repository with runnable application (CLI). In directory where the other plugins are create a directory with your plugin name (in this example we create a plugin named dummy
).
$ mkdir dummy && cd dummy
In that directory at least 2 files are required: CMakeLists.txt
and Plugins.cpp
.
# CMakeLists.txt
build_plugin(dummy SOURCES Plugin.cpp)
// Plugin.cpp
#include "cece/plugin/definition.hpp"
#include "cece/plugin/Api.hpp"
class DummyApi : public cece::plugin::Api { };
CECE_DEFINE_PLUGIN(dummy, DummyApi)
Next step includes the plugin in the build tree. There's a CMake variable CECE_PLUGINS_CUSTOM
which contains a list of additional plugins (default is empty) that are built with standard plugins. You can set it from terminal or from GUI.
$ cmake -DCECE_PLUGINS_CUSTOM=dummy ..