When building with -DENABLE_WAYLAND_TARGET=OFF there is still a Wayland reference which breaks the build: Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp:276:75: error: no member named 'Wayland' in 'WebCore::PlatformDisplay::Type' PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland ? "Wayland" : "X11"); ~~~~~~~~~~~~~~~~~~~~~~~^ 1 warning and 1 error generated.
also applies to Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp:144 and Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp:172