Bundle libdecor in build deps, so the build-bot can build with libdecor support enabled.
As this is dynamically linked to a system library at runtime, only the header is required at build time so the
compiled library doesn't have to be included.
The resulting official builds will use wayland if wayland and libdecor are found, otherwise X11 will be used.
This patch makes changes necessary to have Blender building with wayland on builder.blender.org.
- 1: include libdecor.
- 2: include wayland headers (along with wayland-scanner), needed as the headers generated by wayland-scanner are not compatible with the headers from the older wayland. This requires building wayland with libraries, however the resulting libraries are not used (only the headers).
- 3: change CMake defaults (changes in ./CMakeLists.txt).
Commit message.
Linux: enable WAYLAND by default
Enable the following CMake options:
- WITH_GHOST_WAYLAND Enable Wayland which is now included as part the bundled dependencies. When the pre-compiled libraries aren't used, only X11 will be enabled.
- WITH_GHOST_WAYLAND_DYNLOAD So systems without libwayland can fall back to X11.
- WITH_GHOST_WAYLAND_LIBDECOR To draw window frames on WAYLAND compositors such as gnome-shell which expect client-side decorations (without this the Blender window is borderless).
Given the changes are related and the overall patch is fairly small, I though it would over complicate review to submit this as multiple diff's - but can split them up if that helps.
- Resulting build that dynamically loads wayland libraries & libdecor, tested to work in gnome-shell:
https://builder.blender.org/download/patch/blender-3.4.0-alpha+master-D16091.fc72e49aa1e3-linux.x86_64-release.tar.xz
Note that I temporarily included the headers as part of this patch to test the build-bot, the headers will need to be committed to:- ../lib/linux_centos7_x86_64/wayland
- ../lib/linux_centos7_x86_64/wayland_libdecor
- libdecor (0.1.0 linked from https://gitlab.gnome.org/jadahl/libdecor/-/releases ) should be included in https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/
Related TODO's
- Update https://wiki.blender.org/wiki/Building_Blender/Linux/CentOS7ReleaseEnvironment needs to include the libxkbcommon-devel package.
- Update T101403 to include libdecor.