xref: /aosp_15_r20/external/libdrm/tegra/meson.build (revision 7688df22e49036ff52a766b7101da3a49edadb8c)
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_tegra = library(
22  'drm_tegra',
23  [
24    files(
25      'channel.c', 'job.c', 'private.h', 'pushbuf.c', 'syncpt.c', 'tegra.c'
26    ),
27    config_file
28  ],
29  include_directories : [inc_root, inc_drm],
30  link_with : libdrm,
31  dependencies : [dep_threads, dep_atomic_ops],
32  c_args : libdrm_c_args,
33  gnu_symbol_visibility : 'hidden',
34  version : '0.@[email protected]'.format(patch_ver),
35  install : true,
36)
37
38ext_libdrm_tegra = declare_dependency(
39  link_with : [libdrm, libdrm_tegra],
40  include_directories : [inc_drm, include_directories('.')],
41)
42
43if meson.version().version_compare('>= 0.54.0')
44  meson.override_dependency('libdrm_tegra', ext_libdrm_tegra)
45endif
46
47install_headers('tegra.h', subdir : 'libdrm')
48
49pkg.generate(
50  libdrm_tegra,
51  name : 'libdrm_tegra',
52  subdirs : ['.', 'libdrm'],
53  description : 'Userspace interface to Tegra kernel DRM services',
54)
55
56test(
57  'tegra-symbols-check',
58  symbols_check,
59  args : [
60    '--lib', libdrm_tegra,
61    '--symbols-file', files('tegra-symbols.txt'),
62    '--nm', prog_nm.full_path(),
63  ],
64)
65