Debian Codegraph @

intel/meson.build

raw
1 # Copyright © 2017-2018 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 libdrm_intel = library(
22 'drm_intel',
23 [
24 files(
25 'intel_bufmgr.c', 'intel_bufmgr_fake.c', 'intel_bufmgr_gem.c',
26 'intel_decode.c', 'mm.c',
27 ),
28 config_file,
29 ],
30 include_directories : [inc_root, inc_drm],
31 link_with : libdrm,
32 dependencies : [dep_pciaccess, dep_threads, dep_rt, dep_valgrind, dep_atomic_ops],
33 c_args : libdrm_c_args,
34 gnu_symbol_visibility : 'hidden',
35 version : '1.@[email protected]'.format(patch_ver),
36 install : true,
37 )
38
39 ext_libdrm_intel = declare_dependency(
40 link_with : [libdrm, libdrm_intel],
41 include_directories : [inc_drm, include_directories('.')],
42 )
43
44 meson.override_dependency('libdrm_intel', ext_libdrm_intel)
45
46 install_headers(
47 'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h',
48 subdir : 'libdrm',
49 )
50
51 pkg.generate(
52 libdrm_intel,
53 name : 'libdrm_intel',
54 subdirs : ['.', 'libdrm'],
55 requires : 'libdrm',
56 description : 'Userspace interface to intel kernel DRM services',
57 )
58
59 test_decode = executable(
60 'test_decode',
61 files('test_decode.c'),
62 include_directories : [inc_root, inc_drm],
63 link_with : [libdrm, libdrm_intel],
64 c_args : libdrm_c_args,
65 gnu_symbol_visibility : 'hidden',
66 )
67
68 test(
69 'gen4-3d.batch',
70 find_program('tests/gen4-3d.batch.sh'),
71 workdir : meson.current_build_dir(),
72 )
73 test(
74 'gen45-3d.batch',
75 find_program('tests/gm45-3d.batch.sh'),
76 workdir : meson.current_build_dir(),
77 )
78 test(
79 'gen5-3d.batch',
80 find_program('tests/gen5-3d.batch.sh'),
81 workdir : meson.current_build_dir(),
82 )
83 test(
84 'gen6-3d.batch',
85 find_program('tests/gen6-3d.batch.sh'),
86 workdir : meson.current_build_dir(),
87 )
88 test(
89 'gen7-3d.batch',
90 find_program('tests/gen7-3d.batch.sh'),
91 workdir : meson.current_build_dir(),
92 )
93 test(
94 'gen7-2d-copy.batch',
95 find_program('tests/gen7-2d-copy.batch.sh'),
96 workdir : meson.current_build_dir(),
97 )
98
99 test(
100 'intel-symbols-check',
101 symbols_check,
102 args : [
103 '--lib', libdrm_intel,
104 '--symbols-file', files('intel-symbols.txt'),
105 '--nm', prog_nm.full_path(),
106 ],
107 )