ecc00703641f2b08c3310c82e668ae5cd8c06e06
[mesa.git] / src / gallium / targets / pipe-loader / meson.build
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
21 pipe_loader_link_args = [ld_args_gc_sections]
22 pipe_loader_link_deps = []
23 pipe_loader_link_with = [libgallium]
24 pipe_loader_comp_args = []
25 pipe_loader_incs = [
26 inc_include, inc_src, inc_util, inc_gallium, inc_gallium_drivers,
27 inc_gallium_winsys, inc_gallium_aux,
28 ]
29
30 if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
31 with_gallium_xvmc or with_dri)
32 pipe_loader_link_with += libgalliumvl
33 else
34 pipe_loader_link_with += libgalliumvl_stub
35 endif
36 if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
37 with_gallium_xvmc)
38 pipe_loader_link_with += libgalliumvlwinsys
39 endif
40
41 if with_ld_version_script
42 pipe_loader_link_args += [
43 '-Wl,--version-script', join_paths(meson.current_source_dir(), 'pipe.sym')
44 ]
45 pipe_loader_link_deps += files('pipe.sym')
46 endif
47
48 pipe_loader_install_dir = join_paths(get_option('libdir'), 'gallium-pipe')
49
50 _kmsro_targets = [
51 driver_kmsro, driver_v3d, driver_vc4, driver_freedreno, driver_etnaviv,
52 driver_panfrost, driver_lima,
53 ]
54
55 if with_gallium_v3d
56 _kmsro_targets += [idep_xmlconfig, dep_expat]
57 endif
58
59 pipe_loaders = [
60 [with_gallium_i915, 'i915', driver_i915, []],
61 [with_gallium_nouveau, 'nouveau', driver_nouveau, []],
62 [with_gallium_r300, 'r300', driver_r300, []],
63 [with_gallium_r600, 'r600', driver_r600, []],
64 [with_gallium_radeonsi, 'radeonsi', [driver_radeonsi, idep_xmlconfig], []],
65 [with_gallium_freedreno, 'msm', driver_freedreno, []],
66 [with_gallium_kmsro, 'kmsro', _kmsro_targets, []],
67 [with_gallium_svga, 'vmwgfx', driver_svga, []],
68 [with_gallium_softpipe, 'swrast', [driver_swrast, driver_swr], [libwsw, libws_null]],
69 ]
70
71 foreach x : pipe_loaders
72 if x[0]
73 shared_library(
74 'pipe_@0@'.format(x[1]),
75 'pipe_@0@.c'.format(x[1]),
76 c_args : [pipe_loader_comp_args],
77 cpp_args : [pipe_loader_comp_args],
78 gnu_symbol_visibility : 'hidden',
79 link_args : pipe_loader_link_args,
80 link_depends : pipe_loader_link_deps,
81 include_directories : pipe_loader_incs,
82 link_with : [pipe_loader_link_with, x[3]],
83 dependencies : [idep_mesautil, idep_nir, dep_thread, x[2]],
84 name_prefix : '',
85 install : true,
86 install_dir : pipe_loader_install_dir,
87 )
88 endif
89 endforeach