1d722e3fbSopenharmony_ci# Copyright © 2017 Intel Corporation
2d722e3fbSopenharmony_ci
3d722e3fbSopenharmony_ci# Permission is hereby granted, free of charge, to any person obtaining a copy
4d722e3fbSopenharmony_ci# of this software and associated documentation files (the "Software"), to deal
5d722e3fbSopenharmony_ci# in the Software without restriction, including without limitation the rights
6d722e3fbSopenharmony_ci# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7d722e3fbSopenharmony_ci# copies of the Software, and to permit persons to whom the Software is
8d722e3fbSopenharmony_ci# furnished to do so, subject to the following conditions:
9d722e3fbSopenharmony_ci
10d722e3fbSopenharmony_ci# The above copyright notice and this permission notice shall be included in
11d722e3fbSopenharmony_ci# all copies or substantial portions of the Software.
12d722e3fbSopenharmony_ci
13d722e3fbSopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14d722e3fbSopenharmony_ci# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15d722e3fbSopenharmony_ci# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16d722e3fbSopenharmony_ci# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17d722e3fbSopenharmony_ci# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18d722e3fbSopenharmony_ci# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19d722e3fbSopenharmony_ci# SOFTWARE.
20d722e3fbSopenharmony_ci
21d722e3fbSopenharmony_cilibdrm_omap = library(
22d722e3fbSopenharmony_ci  'drm_omap',
23d722e3fbSopenharmony_ci  [files('omap_drm.c'), config_file],
24d722e3fbSopenharmony_ci  include_directories : [inc_root, inc_drm],
25d722e3fbSopenharmony_ci  c_args : libdrm_c_args,
26d722e3fbSopenharmony_ci  gnu_symbol_visibility : 'hidden',
27d722e3fbSopenharmony_ci  link_with : libdrm,
28d722e3fbSopenharmony_ci  dependencies : [dep_pthread_stubs, dep_atomic_ops],
29d722e3fbSopenharmony_ci  version : '1.0.0',
30d722e3fbSopenharmony_ci  install : true,
31d722e3fbSopenharmony_ci)
32d722e3fbSopenharmony_ci
33d722e3fbSopenharmony_ciext_libdrm_omap = declare_dependency(
34d722e3fbSopenharmony_ci  link_with : [libdrm, libdrm_omap],
35d722e3fbSopenharmony_ci  include_directories : [inc_drm, include_directories('.')],
36d722e3fbSopenharmony_ci)
37d722e3fbSopenharmony_ci
38d722e3fbSopenharmony_ciif meson.version().version_compare('>= 0.54.0')
39d722e3fbSopenharmony_ci  meson.override_dependency('libdrm_omap', ext_libdrm_omap)
40d722e3fbSopenharmony_ciendif
41d722e3fbSopenharmony_ci
42d722e3fbSopenharmony_ciinstall_headers('omap_drmif.h', subdir : 'libdrm')
43d722e3fbSopenharmony_ciinstall_headers('omap_drm.h', subdir : 'omap')
44d722e3fbSopenharmony_ci
45d722e3fbSopenharmony_cipkg.generate(
46d722e3fbSopenharmony_ci  libdrm_omap,
47d722e3fbSopenharmony_ci  name : 'libdrm_omap',
48d722e3fbSopenharmony_ci  subdirs : ['.', 'libdrm', 'omap'],
49d722e3fbSopenharmony_ci  version : '0.6',
50d722e3fbSopenharmony_ci  description : 'Userspace interface to omap kernel DRM services',
51d722e3fbSopenharmony_ci)
52d722e3fbSopenharmony_ci
53d722e3fbSopenharmony_citest(
54d722e3fbSopenharmony_ci  'omap-symbols-check',
55d722e3fbSopenharmony_ci  symbols_check,
56d722e3fbSopenharmony_ci  args : [
57d722e3fbSopenharmony_ci    '--lib', libdrm_omap,
58d722e3fbSopenharmony_ci    '--symbols-file', files('omap-symbols.txt'),
59d722e3fbSopenharmony_ci    '--nm', prog_nm.path(),
60d722e3fbSopenharmony_ci  ],
61d722e3fbSopenharmony_ci)
62