101e04c3fSmrg# Copyright © 2017-2018 Intel Corporation 201e04c3fSmrg 301e04c3fSmrg# Permission is hereby granted, free of charge, to any person obtaining a copy 401e04c3fSmrg# of this software and associated documentation files (the "Software"), to deal 501e04c3fSmrg# in the Software without restriction, including without limitation the rights 601e04c3fSmrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 701e04c3fSmrg# copies of the Software, and to permit persons to whom the Software is 801e04c3fSmrg# furnished to do so, subject to the following conditions: 901e04c3fSmrg 1001e04c3fSmrg# The above copyright notice and this permission notice shall be included in 1101e04c3fSmrg# all copies or substantial portions of the Software. 1201e04c3fSmrg 1301e04c3fSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1401e04c3fSmrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1501e04c3fSmrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1601e04c3fSmrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1701e04c3fSmrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1801e04c3fSmrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1901e04c3fSmrg# SOFTWARE. 2001e04c3fSmrg 2101e04c3fSmrg# TODO: support non-static targets 2201e04c3fSmrg# Static targets are always enabled in autotools (unless you modify 2301e04c3fSmrg# configure.ac) 2401e04c3fSmrg 2501e04c3fSmrgvdpau_link_args = [] 2601e04c3fSmrgvdpau_link_depends = [] 2701e04c3fSmrgvdpau_drivers = [] 2801e04c3fSmrg 2901e04c3fSmrgif with_ld_version_script 3001e04c3fSmrg vdpau_link_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vdpau.sym')] 3101e04c3fSmrg vdpau_link_depends += files('vdpau.sym') 3201e04c3fSmrgendif 3301e04c3fSmrgif with_ld_dynamic_list 3401e04c3fSmrg vdpau_link_args += ['-Wl,--dynamic-list', join_paths(meson.current_source_dir(), '../dri-vdpau.dyn')] 3501e04c3fSmrg vdpau_link_depends += files('../dri-vdpau.dyn') 3601e04c3fSmrgendif 3701e04c3fSmrg 3801e04c3fSmrg 3901e04c3fSmrglibvdpau_gallium = shared_library( 4001e04c3fSmrg 'vdpau_gallium', 417ec681f3Smrg 'target.c', 427ec681f3Smrg gnu_symbol_visibility : 'hidden', 4301e04c3fSmrg link_args : [vdpau_link_args, ld_args_gc_sections], 4401e04c3fSmrg include_directories : [ 457ec681f3Smrg inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers, 4601e04c3fSmrg ], 4701e04c3fSmrg link_whole : [libvdpau_st], 4801e04c3fSmrg link_with : [ 497ec681f3Smrg libgalliumvlwinsys, libgalliumvl, libgallium, 5001e04c3fSmrg libpipe_loader_static, libws_null, libwsw, libswdri, libswkmsdri, 5101e04c3fSmrg ], 5201e04c3fSmrg dependencies : [ 537ec681f3Smrg idep_mesautil, 547ec681f3Smrg driver_r300, driver_r600, driver_radeonsi, driver_nouveau, 5501e04c3fSmrg ], 5601e04c3fSmrg link_depends : vdpau_link_depends, 5701e04c3fSmrg soversion : '@0@.@1@.0'.format(VDPAU_MAJOR, VDPAU_MINOR), 58993e1d59Smrg # Will be deleted during installation, see install_megadrivers.py 59993e1d59Smrg install : true, 60993e1d59Smrg install_dir : vdpau_drivers_path, 619f464c52Smaya name_suffix : 'so', 6201e04c3fSmrg) 6301e04c3fSmrgforeach d : [[with_gallium_r300, 'r300'], 6401e04c3fSmrg [with_gallium_r600, 'r600'], 6501e04c3fSmrg [with_gallium_radeonsi, 'radeonsi'], 6601e04c3fSmrg [with_gallium_nouveau, 'nouveau']] 6701e04c3fSmrg if d[0] 6801e04c3fSmrg vdpau_drivers += 'libvdpau_@0@.so.@1@.@2@.0'.format(d[1], VDPAU_MAJOR, VDPAU_MINOR) 6901e04c3fSmrg endif 7001e04c3fSmrgendforeach 7101e04c3fSmrg 7201e04c3fSmrgmeson.add_install_script( 737ec681f3Smrg install_megadrivers_py.path(), 7401e04c3fSmrg libvdpau_gallium.full_path(), 7501e04c3fSmrg vdpau_drivers_path, 7601e04c3fSmrg vdpau_drivers, 7701e04c3fSmrg) 78