{
    "module": "waylandclient",
    "depends": [
        "gui-private"
    ],
    "testDir": "../../config.tests",

    "libraries": {
        "wayland-client": {
            "label": "Wayland client library",
            "test": "wayland",
            "sources": [
                { "type": "pkgConfig", "args": "wayland-client" },
                "-lwayland-client"
            ]
        },
        "wayland-cursor": {
            "label": "Wayland cursor library",
            "test": "wayland_cursor",
            "use": "wayland-client",
            "sources": [
                { "type": "pkgConfig", "args": "wayland-cursor" },
                "-lwayland-cursor"
            ]
        },
        "wayland-egl": {
            "label": "Wayland EGL library",
            "test": "wayland_egl",
            "sources": [
                { "type": "pkgConfig", "args": "wayland-egl" },
                "-lwayland-egl",
                "-lEGL"
            ]
        },
        "xcomposite": {
            "label": "XComposite",
            "test": "xcomposite",
            "sources": [
                { "type": "pkgConfig", "args": "xcomposite" },
                "-lxcomposite"
            ]
        },
        "glx": {
            "label": "GLX",
            "test": "glx",
            "sources": [
                { "type": "pkgConfig", "args": "x11 gl" },
                "-lX11 -lGl"
            ]
        }
    },

    "tests": {
        "wayland-scanner": {
            "label": "wayland-scanner",
            "type": "compile",
            "test": "wayland_scanner",
            "use": "wayland-client"
        },
        "drm-egl-server": {
            "label": "DRM EGL Server",
            "type": "compile",
            "test": "drm_egl_server",
            "use": "egl"
        },
        "libhybris-egl-server": {
            "label": "libhybris EGL Server",
            "type": "compile",
            "test": "libhybris_egl_server",
            "use": "egl"
        }
    },

    "features": {
        "wayland-client": {
            "label": "Qt Wayland Client",
            "condition": "!config.win32 && libs.wayland-client && libs.wayland-cursor && tests.wayland-scanner",
            "output": [ "privateFeature" ]
        },
        "wayland-datadevice": {
            "condition": "features.draganddrop || features.clipboard",
            "output": [ "privateFeature" ]
        },
        "wayland-egl": {
            "label": "EGL",
            "condition": "features.wayland-client && features.opengl && features.egl && libs.wayland-egl",
            "output": [ "privateFeature" ]
        },
        "wayland-brcm": {
            "label": "Raspberry Pi",
            "condition": "features.wayland-client && features.eglfs_brcm",
            "output": [ "privateFeature" ]
        },
        "xcomposite-egl": {
            "label": "XComposite EGL",
            "condition": "features.wayland-client && features.opengl && features.egl && features.xlib && libs.xcomposite",
            "output": [ "privateFeature" ]
        },
        "xcomposite-glx": {
            "label": "XComposite GLX",
            "condition": "features.wayland-client && features.opengl && !features.opengles2 && features.xlib && libs.xcomposite && libs.glx",
            "output": [ "privateFeature" ]
        },
        "drm-egl-server": {
            "label": "DRM EGL",
            "condition": "features.wayland-client && features.opengl && features.egl && tests.drm-egl-server",
            "output": [ "privateFeature" ]
        },
        "libhybris-egl-server": {
            "label": "libhybris EGL",
            "condition": "features.wayland-client && features.opengl && features.egl && tests.libhybris-egl-server",
            "output": [ "privateFeature" ]
        }
    },

    "report": [
        {
            "type": "note",
            "condition": "!libs.wayland-egl",
            "message": "No wayland-egl support detected. Cross-toolkit compatibility disabled."
        }
    ],

    "summary": [
        {
            "section": "Qt Wayland Drivers",
            "condition": "features.wayland-client",
            "entries": [
                "wayland-egl",
                "wayland-brcm",
                "xcomposite-egl",
                "xcomposite-glx",
                "drm-egl-server",
                "libhybris-egl-server"
            ]
        },
        "wayland-client"
    ]
}
