Debian Codegraph @

src/meson.build

raw
1 if not cc.has_function('dlsym')
2 libdl = cc.find_library('dl')
3 else
4 libdl = []
5 endif
6
7 add_project_arguments('-Wall', language : 'c')
8 add_project_arguments('-Werror', language : 'c')
9 add_project_arguments('-fvisibility=hidden', language : 'c')
10 add_project_arguments('-DWL_HIDE_DEPRECATED', language : 'c')
11 add_project_arguments('-D_GNU_SOURCE', language : 'c')
12 add_project_link_arguments('-Wl,-Bsymbolic', language : 'c')
13
14 if cc.has_argument('-Wpedantic')
15 add_project_arguments('-Wno-pedantic', language : 'c')
16 endif
17
18 wl_protos = dependency('wayland-protocols', version: '>= 1.8')
19 libdrm = dependency('libdrm')
20 wl_protos_dir = wl_protos.get_pkgconfig_variable('pkgdatadir')
21 wl_dmabuf_xml = join_paths(wl_protos_dir, 'unstable', 'linux-dmabuf', 'linux-dmabuf-unstable-v1.xml')
22 wp_presentation_time_xml = join_paths(wl_protos_dir, 'stable', 'presentation-time', 'presentation-time.xml')
23 wl_drm_syncobj_xml = join_paths(wl_protos_dir, 'staging', 'linux-drm-syncobj', 'linux-drm-syncobj-v1.xml')
24
25 client_header = generator(prog_scanner,
26 output : '@[email protected]',
27 arguments : ['client-header', '@INPUT@', '@OUTPUT@']
28 )
29
30 if wl_scanner.version().version_compare('>= 1.14.91')
31 code_arg = 'private-code'
32 else
33 code_arg = 'code'
34 endif
35
36 code = generator(prog_scanner,
37 output : '@[email protected]',
38 arguments : [code_arg, '@INPUT@', '@OUTPUT@']
39 )
40
41 src = [
42 'wayland-thread.c',
43 'wayland-egldevice.c',
44 'wayland-egldisplay.c',
45 'wayland-eglstream.c',
46 'wayland-eglstream-server.c',
47 'wayland-eglsurface.c',
48 'wayland-eglswap.c',
49 'wayland-eglutils.c',
50 'wayland-eglhandle.c',
51 'wayland-external-exports.c',
52 'wayland-drm.c',
53
54 wayland_eglstream_protocol_c,
55 wayland_eglstream_client_protocol_h,
56 wayland_eglstream_server_protocol_h,
57 wayland_eglstream_controller_protocol_c,
58 wayland_eglstream_controller_client_protocol_h,
59 wayland_drm_protocol_c,
60 wayland_drm_client_protocol_h,
61 wayland_drm_server_protocol_h,
62 ]
63
64 src += client_header.process(wl_dmabuf_xml)
65 src += code.process(wl_dmabuf_xml)
66
67 src += client_header.process(wp_presentation_time_xml)
68 src += code.process(wp_presentation_time_xml)
69
70 src += client_header.process(wl_drm_syncobj_xml)
71 src += code.process(wl_drm_syncobj_xml)
72
73 egl_wayland = library('nvidia-egl-wayland',
74 src,
75 dependencies : [
76 egl_headers,
77 eglexternalplatform,
78 wayland_server,
79 wayland_client,
80 wayland_egl_backend,
81 threads,
82 libdrm,
83 libdl,
84 ],
85 include_directories : inc,
86 version : meson.project_version(),
87 install : true,
88 )
89
90 install_data('10_nvidia_wayland.json',
91 install_dir: '@0@/egl/egl_external_platform.d'.format(get_option('datadir')))