-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
107 lines (98 loc) · 3.93 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
project('drminfo', 'c', default_options : [ 'c_std=c99' ] )
# tweak warnings
add_global_arguments('-D_POSIX_SOURCE=1', language : 'c')
add_global_arguments('-D_GNU_SOURCE=1', language : 'c')
# pkg-config deps
libdrm_dep = dependency('libdrm')
gbm_dep = dependency('gbm')
cairo_dep = dependency('cairo')
pixman_dep = dependency('pixman-1')
udev_dep = dependency('libudev')
input_dep = dependency('libinput')
epoxy_dep = dependency('epoxy', required : false)
gtk3_dep = dependency('gtk+-3.0', required : false)
xcb_dep = dependency('xcb', required : false)
randr_dep = dependency('xcb-randr', required : false, version : '>=1.13')
systemd_dep = dependency('libsystemd', required : false, version : '>=221')
# configuration
config = configuration_data()
if systemd_dep.found()
config.set('HAVE_SYSTEMD', true)
endif
if randr_dep.found()
config.set('HAVE_XRANDR', true)
endif
configure_file(output : 'config.h', configuration : config)
# libjpeg dep
jpeg_dep = declare_dependency(link_args : '-ljpeg')
drminfo_srcs = [ 'drminfo.c', 'drmtools.c', 'drm-lease.c', 'drm-lease-x11.c',
'logind.c', 'complete.c' ]
drmtest_srcs = [ 'drmtest.c', 'drmtools.c', 'drm-lease.c', 'drm-lease-x11.c',
'logind.c', 'complete.c', 'ttytools.c', 'render.c', 'image.c' ]
fbinfo_srcs = [ 'fbinfo.c', 'fbtools.c', 'logind.c', 'complete.c' ]
fbtest_srcs = [ 'fbtest.c', 'fbtools.c', 'logind.c', 'complete.c',
'ttytools.c', 'render.c', 'image.c' ]
prime_srcs = [ 'prime.c', 'logind.c', 'complete.c' ]
viotest_srcs = [ 'virtiotest.c', 'drmtools.c', 'logind.c', 'complete.c',
'ttytools.c', 'render.c' ]
egltest_srcs = [ 'egltest.c', 'drmtools.c', 'drmtools-egl.c',
'drm-lease.c', 'drm-lease-x11.c',
'logind.c', 'complete.c', 'ttytools.c' ]
gtktest_srcs = [ 'gtktest.c', 'render.c', 'image.c', 'complete.c' ]
drminfo_deps = [ libdrm_dep, cairo_dep, pixman_dep, systemd_dep,
xcb_dep, randr_dep ]
drmtest_deps = [ libdrm_dep, gbm_dep,
xcb_dep, randr_dep,
cairo_dep, pixman_dep, jpeg_dep,
udev_dep, input_dep, systemd_dep ]
fbinfo_deps = [ cairo_dep, systemd_dep ]
fbtest_deps = [ cairo_dep, pixman_dep, jpeg_dep,
udev_dep, input_dep, systemd_dep ]
prime_deps = [ libdrm_dep, gbm_dep, systemd_dep ]
viotest_deps = [ libdrm_dep, gbm_dep,
cairo_dep, pixman_dep, jpeg_dep,
udev_dep, input_dep, systemd_dep ]
egltest_deps = [ libdrm_dep, gbm_dep, epoxy_dep,
xcb_dep, randr_dep,
cairo_dep, pixman_dep,
udev_dep, input_dep, systemd_dep ]
gtktest_deps = [ gtk3_dep,
cairo_dep, pixman_dep, jpeg_dep ]
executable('drminfo',
sources : drminfo_srcs,
dependencies : drminfo_deps,
install : true)
executable('drmtest',
sources : drmtest_srcs,
dependencies : drmtest_deps,
install : true)
executable('fbinfo',
sources : fbinfo_srcs,
dependencies : fbinfo_deps,
install : true)
executable('fbtest',
sources : fbtest_srcs,
dependencies : fbtest_deps,
install : true)
executable('prime',
sources : prime_srcs,
dependencies : prime_deps,
install : true)
executable('virtiotest',
sources : viotest_srcs,
dependencies : viotest_deps,
install : true)
install_man('drminfo.1')
install_man('drmtest.1')
if epoxy_dep.found()
executable('egltest',
sources : egltest_srcs,
dependencies : egltest_deps,
install : true)
endif
if gtk3_dep.found()
executable('gtktest',
sources : gtktest_srcs,
dependencies : gtktest_deps,
install : false)
endif