Configure backend search path
I am preparing a snap package for Weston and struggling with the backend search path.
In a normal system installation, the backends are installed to /usr/lib/x86_64-linux-gnu/libweston-7/
. It seems that this path is hardcoded in Weston but can be overwritten via WESTON_MODULE_MAP
. I couldn't find documentation on this.
In a snap package, these paths map to /snap/<name>/<version>/usr/lib/x86_64-linux-gnu/libweston-7/
. The current solution is to manually define the mapping WESTON_MODULE_MAP: "wayland-backend.so=${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libweston-7/wayland-backend.so;gl-renderer.so=${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libweston-7/gl-renderer.so"
for every backend that is installed. This is not easily maintainable since you need to update WESTON_MODULE_MAP
vor every new weston version and you need to know which backends are compiled.
It would be beneficial if the search behaviour could be configured by either (1) having Weston search relative to its executable, or (2) setting the search path at compile time.