gallium: rename 'state tracker' to 'frontend'
[mesa.git] / src / gallium / frontends / xvmc / meson.build
1 # Copyright © 2017, 2019 Intel Corporation
2
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 # SOFTWARE.
20
21 libxvmc_st = static_library(
22 'xvmc_st',
23 files('attributes.c', 'block.c', 'context.c', 'surface.c', 'subpicture.c'),
24 c_args : [c_vis_args],
25 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
26 dependencies : [
27 dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xv,
28 dep_libdrm,
29 ],
30 )
31
32 # These tests will not work without a working xvmc configuration.
33 if with_tools.contains('xvmc')
34 # pkg-config was added in 1.0.12, so allow fallback
35 dep_xvmcw = dependency('xvmc-wrapper', required : false)
36 if not dep_xvmcw.found()
37 dep_xvmcw = cc.find_library('XvMCW')
38 endif
39 dep_real_xvmc = dependency('xvmc')
40
41 foreach x : ['context', 'surface', 'subpicture', 'blocks', 'rendering']
42 _name = 'xvmc_@0@'.format(x)
43 executable(
44 _name,
45 files('tests/test_@0@.c'.format(x), 'tests/testlib.c'),
46 dependencies : [
47 dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3,
48 dep_xvmcw, dep_xv,
49 ],
50 install: true,
51 )
52 endforeach
53
54 executable(
55 'xvmc_bench',
56 files('tests/xvmc_bench.c', 'tests/testlib.c'),
57 dependencies : [
58 dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3,
59 dep_xvmcw, dep_xv,
60 ],
61 install: true,
62 )
63 endif