• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Mesa 3-D graphics library
2#
3# Copyright (C) 2022 Roman Stratiienko (r.stratiienko@gmail.com)
4# SPDX-License-Identifier: MIT
5
6c_args_for_u_gralloc = []
7cpp_args_for_u_gralloc = []
8options_for_u_gralloc = []
9deps_for_u_gralloc = [dep_android]
10
11files_u_gralloc = files(
12  'u_gralloc.c',
13  'u_gralloc_internal.c',
14  'u_gralloc_fallback.c',
15  'u_gralloc_cros_api.c',
16  'u_gralloc_libdrm.c',
17  'u_gralloc_qcom.c',
18)
19
20if dep_android_ui.found()
21  files_u_gralloc += files('u_gralloc_imapper5_api.cpp')
22  c_args_for_u_gralloc += '-DUSE_IMAPPER4_METADATA_API'
23  cpp_args_for_u_gralloc += '-DUSE_IMAPPER4_METADATA_API'
24  options_for_u_gralloc += 'cpp_std=c++17'
25elif dep_android_mapper4.found()
26  files_u_gralloc += files('u_gralloc_imapper4_api.cpp')
27  c_args_for_u_gralloc += '-DUSE_IMAPPER4_METADATA_API'
28  cpp_args_for_u_gralloc += '-DUSE_IMAPPER4_METADATA_API'
29  options_for_u_gralloc += 'cpp_std=c++17'
30  deps_for_u_gralloc += dep_android_mapper4
31endif
32
33if with_freedreno_vk or with_gallium_freedreno
34  c_args_for_u_gralloc += '-DHAS_FREEDRENO'
35endif
36
37_libmesa_u_gralloc = static_library(
38  '_mesa_u_gralloc',
39  [files_u_gralloc],
40  include_directories : [inc_include, inc_util],
41  c_args : c_args_for_u_gralloc,
42  cpp_args : cpp_args_for_u_gralloc,
43  override_options : options_for_u_gralloc,
44  gnu_symbol_visibility : 'hidden',
45  build_by_default : false,
46  dependencies: deps_for_u_gralloc,
47)
48
49idep_u_gralloc = declare_dependency(link_with: _libmesa_u_gralloc)
50