meson.build revision b8e80941
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 = [] 31 32if with_ld_version_script 33 gallium_nine_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'd3dadapter9.sym')] 34 gallium_nine_link_depends += files('d3dadapter9.sym') 35endif 36 37libgallium_nine = shared_library( 38 'd3dadapter9', 39 [files('description.c', 'getproc.c', 'drm.c'), xmlpool_options_h], 40 include_directories : [ 41 inc_include, inc_src, inc_loader, inc_mapi, inc_mesa, inc_util, 42 inc_dri_common, inc_gallium, inc_gallium_aux, inc_gallium_winsys, 43 inc_gallium_drivers, inc_d3d9, 44 include_directories('../../state_trackers/nine'), 45 ], 46 c_args : [c_vis_args, gallium_nine_c_args], 47 cpp_args : [cpp_vis_args], 48 link_args : [ld_args_gc_sections, gallium_nine_ld_args], 49 link_depends : gallium_nine_link_depends, 50 link_with : [ 51 libgalliumvl_stub, libgallium, libnine_st, libmesa_util, 52 libpipe_loader_static, libws_null, libwsw, libswdri, 53 libswkmsdri, libnir, 54 ], 55 dependencies : [ 56 dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_thread, 57 driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau, 58 driver_i915, driver_svga, driver_iris 59 ], 60 name_prefix : '', 61 version : '.'.join(nine_version), 62 install : true, 63 install_dir : d3d_drivers_path, 64) 65 66pkg.generate( 67 name : 'd3d', 68 description : 'Native D3D driver modules', 69 version : '.'.join(nine_version), 70 requires_private : 'libdrm >= ' + dep_libdrm.version(), 71 variables : ['moduledir=@0@'.format(d3d_drivers_path)], 72) 73