xref: /aosp_15_r20/external/mesa3d/src/gallium/auxiliary/pipe-loader/meson.build (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1# Copyright © 2017 Dylan Baker
2# SPDX-License-Identifier: MIT
3
4files_pipe_loader = files(
5  'pipe_loader.c',
6  'pipe_loader.h',
7  'pipe_loader_priv.h',
8  'pipe_loader_sw.c',
9  'driinfo_gallium.h',
10)
11
12libpipe_loader_defines = []
13libpipe_loader_links = []
14
15if dep_libdrm.found()
16  files_pipe_loader += files('pipe_loader_drm.c')
17  libpipe_loader_links += libloader
18endif
19
20renderonly_drivers_c_args = []
21if with_gallium_etnaviv
22  renderonly_drivers_c_args += '-DGALLIUM_ETNAVIV'
23endif
24if with_gallium_lima
25  renderonly_drivers_c_args += '-DGALLIUM_LIMA'
26endif
27if with_gallium_v3d
28  renderonly_drivers_c_args += '-DGALLIUM_V3D'
29endif
30if with_gallium_vc4
31  renderonly_drivers_c_args += '-DGALLIUM_VC4'
32endif
33if with_gallium_freedreno
34  renderonly_drivers_c_args += '-DGALLIUM_FREEDRENO'
35endif
36if with_gallium_panfrost
37  renderonly_drivers_c_args += '-DGALLIUM_PANFROST'
38endif
39if with_gallium_asahi
40  renderonly_drivers_c_args += '-DGALLIUM_ASAHI'
41endif
42
43libpipe_loader_static = static_library(
44  'pipe_loader_static',
45  files_pipe_loader,
46  include_directories : [
47    inc_util, inc_loader, inc_gallium, inc_include, inc_src, inc_gallium_aux,
48    inc_gallium_winsys, inc_gallium_drivers,
49  ],
50  c_args : [libpipe_loader_defines, '-DGALLIUM_STATIC_TARGETS=1', renderonly_drivers_c_args],
51  gnu_symbol_visibility : 'hidden',
52  link_with : [libpipe_loader_links],
53  dependencies : [dep_libdrm, idep_xmlconfig, idep_mesautil],
54  build_by_default : false,
55)
56
57libpipe_loader_dynamic = static_library(
58  'pipe_loader_dynamic',
59  files_pipe_loader,
60  include_directories : [
61    inc_util, inc_loader, inc_gallium, inc_include, inc_src, inc_gallium_aux,
62    inc_gallium_winsys, inc_gallium_drivers,
63  ],
64  c_args : [
65    libpipe_loader_defines,
66    '-DPIPE_SEARCH_DIR="@0@"'.format(
67      join_paths(get_option('prefix'), get_option('libdir'), 'gallium-pipe')
68    )
69  ],
70  gnu_symbol_visibility : 'hidden',
71  link_with : [libpipe_loader_links],
72  dependencies : [dep_libdrm, idep_xmlconfig, idep_mesautil],
73  build_by_default : false,
74)
75