• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2017 Dylan Baker
2# Copyright © 2018 Intel Corporation
3
4# Permission is hereby granted, free of charge, to any person obtaining a copy
5# of this software and associated documentation files (the "Software"), to deal
6# in the Software without restriction, including without limitation the rights
7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8# copies of the Software, and to permit persons to whom the Software is
9# furnished to do so, subject to the following conditions:
10
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20# SOFTWARE.
21
22# TODO: support non-static targets
23# Static targets are always enabled in autotools (unless you modify
24# configure.ac)
25
26nine_version = ['1', '0', '0']
27
28gallium_nine_c_args = []
29gallium_nine_ld_args = []
30gallium_nine_link_depends = []
31gallium_nine_link_with = [
32    libgallium, libnine_st,
33    libpipe_loader_static, libws_null, libwsw, libswdri,
34    libswkmsdri,
35]
36
37if with_ld_version_script
38  gallium_nine_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'd3dadapter9.sym')]
39  gallium_nine_link_depends += files('d3dadapter9.sym')
40endif
41
42if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
43    with_gallium_xvmc or with_dri)
44  gallium_nine_link_with += libgalliumvl
45else
46  gallium_nine_link_with += libgalliumvl_stub
47endif
48
49libgallium_nine = shared_library(
50  'd3dadapter9',
51  files('description.c', 'getproc.c', 'drm.c'),
52  include_directories : [
53    inc_include, inc_src, inc_loader, inc_mapi, inc_mesa, inc_util,
54    inc_dri_common, inc_gallium, inc_gallium_aux, inc_gallium_winsys,
55    inc_gallium_drivers, inc_d3d9,
56    include_directories('../../frontends/nine'),
57  ],
58  c_args : [gallium_nine_c_args],
59  gnu_symbol_visibility : 'hidden',
60  link_args : [ld_args_build_id, ld_args_gc_sections, gallium_nine_ld_args],
61  link_depends : gallium_nine_link_depends,
62  link_with : gallium_nine_link_with,
63  dependencies : [
64    dep_selinux, dep_libdrm, dep_llvm, dep_thread,
65    idep_xmlconfig, idep_mesautil, idep_nir,
66    driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
67    driver_i915, driver_svga, driver_iris, driver_crocus, driver_zink
68  ],
69  name_prefix : '',
70  version : '.'.join(nine_version),
71  install : true,
72  install_dir : d3d_drivers_path,
73)
74
75pkg.generate(
76  name : 'd3d',
77  description : 'Native D3D driver modules',
78  version : '.'.join(nine_version),
79  requires_private : 'libdrm >= ' + dep_libdrm.version(),
80  variables : ['moduledir=@0@'.format(d3d_drivers_path)],
81)
82