This is a minimum example of a model plugin for Evoplex. It has the essential files for you to create a new model plugin:
├── CMakeLists.txt
├── metadata.json
├── plugin.cpp
└── plugin.h
You do not need to touch the CMakeLists.txt
file. Also, you must NOT rename any of those files.
👉 Note: you DO NOT need to compile Evoplex from source to be able to create plugins.
- If you compiled Evoplex from source, you already have all dependencies to compile a plugin and DO NOT have to install anything else.
- If you installed Evoplex from the binary packages, you will have to install the dependencies as follows:
👉 if you compiled Evoplex from source in Debug mode, you should also compile your plugin in Debug mode.
👉 the plugin must be compiled with the same architecture (32/64 bits) of Evoplex.
- Open the
CMakeLists.txt
- In the projects page, make sure the
EvoplexCore_DIR
is set. If it showsEvoplexCore_DIR-NOTFOUND
and you compiled Evoplex from source (eg., at~/evoplex/build
), set it to~/evoplex/build/src/core/EvoplexCore/
as shown here. - Build
Assuming you placed this repository at ~/evoplex/minimal-model
and you are at ~/evoplex
, just run the commands below:
mkdir build-plugin
cd build-plugin
cmake ../minimal-model
cmake --build .
When you run the cmake
command, you might get an error like FindEvoplexCore.cmake
not found. If you compiled Evoplex from source (eg., at ~/evoplex/build
), just run the command below:
export EvoplexCore_DIR=~/evoplex/build/src/core/EvoplexCore/
After compiling the plugin, open Evoplex, go to the Plugins
page, click on import
and select the plugin_minimal-model
file at ~/evoplex/minimal-model/build/plugin/
. The plugin will now be available in the Projects
page.
- Ask a question in the mailing list (or send it directly to evoplex@googlegroups.com)
- Follow us on Twitter
- Join us on our Gitter chat channel
This plugin is available freely under the MIT license.