intel/perf: move free_sample_bufs into perf
[mesa.git] / src / mesa / drivers / dri / meson.build
1 # Copyright © 2017 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
21 subdir('common')
22
23 _dri_drivers = []
24 _dri_link = []
25 if with_dri_swrast
26 subdir('swrast')
27 _dri_drivers += libswrast_dri
28 _dri_link += 'swrast_dri.so'
29 endif
30 if with_dri_i915
31 subdir('i915')
32 _dri_drivers += libi915
33 _dri_link += 'i915_dri.so'
34 endif
35 if with_dri_i965
36 subdir('i965')
37 _dri_drivers += libi965
38 _dri_link += 'i965_dri.so'
39 endif
40 if with_dri_r100
41 subdir('radeon')
42 _dri_drivers += libr100
43 _dri_link += 'radeon_dri.so'
44 endif
45 if with_dri_r200
46 subdir('r200')
47 _dri_drivers += libr200
48 _dri_link += 'r200_dri.so'
49 endif
50 if with_dri_nouveau
51 subdir('nouveau')
52 _dri_drivers += libnouveau_vieux
53 _dri_link += 'nouveau_vieux_dri.so'
54 endif
55
56 if _dri_drivers != []
57 libmesa_dri_drivers = shared_library(
58 'mesa_dri_drivers',
59 [],
60 link_whole : _dri_drivers,
61 link_with : [
62 libmegadriver_stub, libdricommon, libglapi,
63 libmesa_classic,
64 ],
65 dependencies : [
66 dep_selinux, dep_libdrm, dep_m, dep_thread, dep_dl,
67 idep_nir, idep_xmlconfig, idep_mesautil,
68 ],
69 link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections],
70 # Will be deleted during installation, see install_megadrivers.py
71 install : true,
72 install_dir : dri_drivers_path,
73 name_suffix : 'so',
74 )
75
76 meson.add_install_script(
77 prog_python.path(),
78 join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
79 libmesa_dri_drivers.full_path(),
80 dri_drivers_path,
81 _dri_link,
82 )
83 endif
84
85 # This needs to be installed if any dri drivers (including gallium dri drivers)
86 # are built.
87 if with_dri
88 dri_req_private = []
89 if dep_libdrm.found()
90 dri_req_private = ['libdrm >= ' + dep_libdrm.version()]
91 endif
92
93 pkg.generate(
94 name : 'dri',
95 filebase : 'dri',
96 description : 'Direct Rendering Infrastructure',
97 version : meson.project_version(),
98 variables : ['dridriverdir=' + dri_drivers_path],
99 requires_private : dri_req_private,
100 )
101 endif