meson.build 2.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
srcs = [
    'xwayland.c',
    'xwayland-input.c',
    'xwayland-cursor.c',
    'xwayland-shm.c',
    'xwayland-output.c',
    'xwayland-cvt.c',
    'xwayland-vidmode.c',
    '../../mi/miinitext.c',
]

scanner_dep = dependency('wayland-scanner', native: true)
scanner = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))

protocols_dep = dependency('wayland-protocols')
protodir = protocols_dep.get_pkgconfig_variable('pkgdatadir')

pointer_xml = join_paths(protodir, 'unstable', 'pointer-constraints', 'pointer-constraints-unstable-v1.xml')
relative_xml = join_paths(protodir, 'unstable', 'relative-pointer', 'relative-pointer-unstable-v1.xml')
20
tablet_xml = join_paths(protodir, 'unstable', 'tablet', 'tablet-unstable-v2.xml')
21
kbgrab_xml = join_paths(protodir, 'unstable', 'xwayland-keyboard-grab', 'xwayland-keyboard-grab-unstable-v1.xml')
22
xdg_output_xml = join_paths(protodir, 'unstable', 'xdg-output', 'xdg-output-unstable-v1.xml')
23 24 25 26 27 28 29 30 31 32 33

client_header = generator(scanner,
    output : '@BASENAME@-client-protocol.h',
    arguments : ['client-header', '@INPUT@', '@OUTPUT@']
)
code = generator(scanner,
    output : '@BASENAME@-protocol.c',
    arguments : ['code', '@INPUT@', '@OUTPUT@']
)
srcs += client_header.process(relative_xml)
srcs += client_header.process(pointer_xml)
34
srcs += client_header.process(tablet_xml)
35
srcs += client_header.process(kbgrab_xml)
36
srcs += client_header.process(xdg_output_xml)
37 38
srcs += code.process(relative_xml)
srcs += code.process(pointer_xml)
39
srcs += code.process(tablet_xml)
40
srcs += code.process(kbgrab_xml)
41
srcs += code.process(xdg_output_xml)
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

xwayland_glamor = []
if gbm_dep.found()
    srcs += 'xwayland-glamor.c'
    if build_xv
        srcs += 'xwayland-glamor-xv.c'
    endif

    srcs += client_header.process('drm.xml')
    srcs += code.process('drm.xml')
    xwayland_dep += gbm_dep
    xwayland_glamor += glamor
endif

executable(
    'Xwayland',
    srcs,
    include_directories: inc,
    dependencies: [
        common_dep,
        xwayland_dep,
    ],
    link_with: [
        libxserver_main,
        xwayland_glamor,
        libxserver_fb,
        libxserver,
        libxserver_xext_vidmode,
        libxserver_xkb_stubs,
        libxserver_xi_stubs,
        libxserver_glx,
73
        libglxvnd,
74 75 76
    ],
    install: true,
)