Specifying Which Plugins to Build
By default all plugins are enabled and built as dynamic .so
(or .dll
) modules. If a plugin does not support dynamic builds, it is not built at all.
To specify that a specific plugin should be enabled and built statically into the server executable, use the -DWITH_xxx=1
cmake option (where xxx
is the plugin name). Of course, static linking only works if the plugin itself supports it — some plugins can only be built as dynamic modules.
A plugin will automatically be skipped by cmake if it cannot be built; for example, if some required libraries are missing or if you want to statically link a plugin that only supports dynamic linking.
If you want to avoid building some specific plugin, specify the -DWITHOUT_xxx=1
cmake option.
Use PLUGIN_xxx
cmake variables. They can be set on the command line with -DPLUGIN_xxx=value
or in the cmake gui. Supported values are
Value | Effect |
---|---|
NO | the plugin will be not compiled at all |
STATIC | the plugin will be compiled statically, if supported. Otherwise it will be not compiled. |
DYNAMIC | the plugin will be compiled dynamically, if supported. Otherwise it will be not compiled. This is the default behavior. |
AUTO | the plugin will be compiled statically, if supported. Otherwise it will be compiled dynamically. |
YES | same as AUTO, but if plugin prerequisites (for example, specific libraries) are missing, it will not be skipped, it will abort cmake with an error. |
Note that unlike autotools, cmake tries to configure and build incrementally. You can modify one configuration option and cmake will only rebuild the part of the tree affected by it. For example, when you do cmake -DWITH_EMBEDDED_SERVER=1
in the already-built tree, it will make libmysqld to be built, but no other configuration options will be changed or reset to their default values.
In particular this means that if you have run, for example
cmake -DPLUGIN_OQGRAPH=NO
and later you want to restore the default behavior (with OQGraph being built) in the same build tree, you would need to run
cmake -DPLUGIN_OQGRAPH=DYNAMIC
Alternatively, you might simply delete the CMakeCache.txt
file — this is the file where cmake stores current build configuration — and rebuild everything from scratch.
© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/specifying-which-plugins-to-build/