25b26a34cac4f9fec7d7aaa9bb6bf058b958c07c
[mesa.git] / src / gallium / targets / pipe-loader / 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 pipe_loader_link_args = [ld_args_gc_sections]
22 pipe_loader_link_deps = []
23 pipe_loader_link_with = [libgallium, libnir, libmesa_util, librbug, libtrace]
24 pipe_loader_comp_args = ['-DGALLIUM_RBUG', '-DGALLIUM_TRACE']
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 or
31 with_gallium_xvmc or with_dri)
32 pipe_loader_link_with += libgalliumvl
33 else
34 pipe_loader_link_with += libgalliumvl_stubs
35 endif
36 if with_gallium_va or with_gallium_vdpau or with_gallium_omx or with_gallium_xvmc
37 pipe_loader_link_with += libgalliumvlwinsys
38 endif
39
40 if with_ld_version_script
41 pipe_loader_link_args += [
42 '-Wl,--version-script', join_paths(meson.current_source_dir(), 'pipe.sym')
43 ]
44 pipe_loader_link_deps += files('pipe.sym')
45 endif
46
47 pipe_loader_install_dir = join_paths(get_option('libdir'), 'gallium-pipe')
48
49 pipe_loaders = [
50 [with_gallium_i915, 'i915', driver_i915, [], []],
51 [with_gallium_nouveau, 'nouveau', driver_nouveau, [], []],
52 [with_gallium_r300, 'r300', driver_r300, [], []],
53 [with_gallium_r600, 'r600', driver_r600, [], []],
54 [with_gallium_radeonsi, 'radeonsi', driver_radeonsi, [libxmlconfig], [xmlpool_options_h]],
55 [with_gallium_freedreno, 'msm', driver_freedreno, [], []],
56 [with_gallium_svga, 'vmwgfx', driver_svga, [], []],
57 [with_gallium_softpipe, 'swrast', [driver_swrast, driver_swr], [libwsw, libws_null], []],
58 ]
59
60 foreach x : pipe_loaders
61 if x[0]
62 shared_library(
63 'pipe_@0@'.format(x[1]),
64 ['pipe_@0@.c'.format(x[1]), x[4]],
65 c_args : [pipe_loader_comp_args, c_vis_args],
66 cpp_args : [pipe_loader_comp_args, cpp_vis_args],
67 link_args : pipe_loader_link_args,
68 link_depends : pipe_loader_link_deps,
69 include_directories : pipe_loader_incs,
70 link_with : [pipe_loader_link_with, x[3]],
71 dependencies : [dep_thread, x[2]],
72 name_prefix : '',
73 install : true,
74 install_dir : pipe_loader_install_dir,
75 )
76 endif
77 endforeach