• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
21libdrm_intel = shared_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', 'intel_chipset.c',
27    ),
28    config_file,
29  ],
30  include_directories : [inc_root, inc_drm],
31  link_with : libdrm,
32  dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops],
33  c_args : libdrm_c_args,
34  version : '1.0.0',
35  install : true,
36)
37
38ext_libdrm_intel = declare_dependency(
39  link_with : [libdrm, libdrm_intel],
40  include_directories : [inc_drm, include_directories('.')],
41)
42
43install_headers(
44  'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h',
45  subdir : 'libdrm',
46)
47
48pkg.generate(
49  name : 'libdrm_intel',
50  libraries : libdrm_intel,
51  subdirs : ['.', 'libdrm'],
52  version : meson.project_version(),
53  requires : 'libdrm',
54  description : 'Userspace interface to intel kernel DRM services',
55)
56
57test_decode = executable(
58  'test_decode',
59  files('test_decode.c'),
60  include_directories : [inc_root, inc_drm],
61  link_with : [libdrm, libdrm_intel],
62  c_args : libdrm_c_args,
63)
64
65test(
66  'gen4-3d.batch',
67  find_program('tests/gen4-3d.batch.sh'),
68  workdir : meson.current_build_dir(),
69)
70test(
71  'gen45-3d.batch',
72  find_program('tests/gm45-3d.batch.sh'),
73  workdir : meson.current_build_dir(),
74)
75test(
76  'gen5-3d.batch',
77  find_program('tests/gen5-3d.batch.sh'),
78  workdir : meson.current_build_dir(),
79)
80test(
81  'gen6-3d.batch',
82  find_program('tests/gen6-3d.batch.sh'),
83  workdir : meson.current_build_dir(),
84)
85test(
86  'gen7-3d.batch',
87  find_program('tests/gen7-3d.batch.sh'),
88  workdir : meson.current_build_dir(),
89)
90test(
91  'gen7-2d-copy.batch',
92  find_program('tests/gen7-2d-copy.batch.sh'),
93  workdir : meson.current_build_dir(),
94)
95
96test(
97  'intel-symbols-check',
98  symbols_check,
99  args : [
100    '--lib', libdrm_intel,
101    '--symbols-file', files('intel-symbols.txt'),
102    '--nm', prog_nm.path(),
103  ],
104)
105