How LÖVR plugins work
devPlugins in LÖVR are optional native libraries built alongside the engine. When building LÖVR via CMake, any folder within the plugins directory containing a CMakeLists.txt file is automatically scanned, included, and built.
Key characteristics:
- Automatic Linking: Any CMake targets declared by a plugin are automatically linked with LÖVR's Lua instance.
- Lua Integration: Shared libraries produced by plugins are copied next to the
lovrexecutable, enabling them to be loaded in Lua scripts using the standardrequirefunction. - Core Plugins: LÖVR includes certain 'core plugins' in the repository that are included in builds by default. These are optional; their folders can be removed or their libraries deleted after a build without affecting the LÖVR build process.