By default all plugins are enabled and built as dynamic
.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.
PLUGIN_xxx cmake variables. They can be set on the command line with
-DPLUGIN_xxx=value or in the cmake gui. Supported values are
|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
and later you want to restore the default behavior (with OQGraph being built) in the same build tree, you would need to run
Alternatively, you might simply delete the
CMakeCache.txt file — this is the file where cmake stores current build configuration — and rebuild everything from scratch.
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.