meson: build gallium nine state_tracker
[mesa.git] / src / gallium / targets / d3dadapter9 / meson.build
1 # Copyright © 2017 Dylan Baker
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 # TODO: support non-static targets
22 # Static targets are always enabled in autotools (unless you modify
23 # configure.ac)
24
25 nine_version = ['1', '0', '0']
26
27 gallium_nine_c_args = [
28 '-DGALLIUM_DDEBUG',
29 '-DGALLIUM_RBUG',
30 '-DGALLIUME_TRACE',
31 ]
32 gallium_nine_ld_args = []
33 gallium_nine_link_depends = []
34 gallium_nine_link_with = []
35
36 if with_ld_version_script
37 gallium_nine_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'd3dadapter9.sym')]
38 gallium_nine_link_depends += files('d3dadapter9.sym')
39 endif
40
41 if with_dri
42 gallium_nine_link_with += libswdri
43 endif
44 if with_gallium_drisw_kms
45 gallium_nine_link_with += libswkmsdri
46 endif
47
48 libgallium_nine = shared_library(
49 'd3dadapter9',
50 files('description.c', 'getproc.c', 'drm.c'),
51 include_directories : [
52 inc_include, inc_src, inc_loader, inc_mapi, inc_mesa, inc_util,
53 inc_dri_common, inc_gallium, inc_gallium_aux, inc_gallium_winsys,
54 inc_gallium_drivers, inc_d3d9,
55 include_directories('../../state_trackers/nine'),
56 ],
57 c_args : [c_vis_args, gallium_nine_c_args],
58 cpp_args : [cpp_vis_args],
59 link_args : [ld_args_gc_sections, gallium_nine_ld_args],
60 link_depends : gallium_nine_link_depends,
61 link_with : [
62 libgalliumvl_stub, libgallium, libnine_st, libmesa_util, libddebug,
63 librbug, libtrace, libpipe_loader_static, libws_null, libwsw,
64 gallium_nine_link_with,
65 ],
66 dependencies : [
67 dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_lmsensors,
68 driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
69 driver_i915, driver_svga,
70 ],
71 version : '.'.join(nine_version),
72 install : true,
73 install_dir : d3d_drivers_path,
74 )
75
76 pkg.generate(
77 name : 'd3d',
78 description : 'Native D3D driver modules',
79 version : '.'.join(nine_version),
80 requires_private : 'libdrm >= 2.4.75',
81 )