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 21subdir('common') 22 23_dri_drivers = [] 24_dri_link = [] 25if with_dri_i915 26 subdir('i915') 27 _dri_drivers += libi915 28 _dri_link += 'i830_dri.so' 29 _dri_link += 'i915_dri.so' 30endif 31if with_dri_i965 32 subdir('i965') 33 _dri_drivers += libi965 34 _dri_link += 'i965_dri.so' 35endif 36if with_dri_r100 37 subdir('radeon') 38 _dri_drivers += libr100 39 _dri_link += 'radeon_dri.so' 40endif 41if with_dri_r200 42 subdir('r200') 43 _dri_drivers += libr200 44 _dri_link += 'r200_dri.so' 45endif 46if with_dri_nouveau 47 subdir('nouveau') 48 _dri_drivers += libnouveau_vieux 49 _dri_link += 'nouveau_vieux_dri.so' 50endif 51 52if _dri_drivers != [] 53 libmesa_dri_drivers = shared_library( 54 'mesa_dri_drivers', 55 [], 56 link_whole : _dri_drivers, 57 link_with : [ 58 libmegadriver_stub, libdricommon, libglapi, 59 libmesa_classic, 60 ], 61 dependencies : [ 62 dep_selinux, dep_libdrm, dep_m, dep_thread, dep_dl, 63 idep_nir, idep_xmlconfig, idep_mesautil, 64 ], 65 link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections], 66 # Will be deleted during installation, see install_megadrivers.py 67 install : true, 68 install_dir : dri_drivers_path, 69 name_suffix : 'so', 70 ) 71 72 meson.add_install_script( 73 install_megadrivers_py.path(), 74 libmesa_dri_drivers.full_path(), 75 dri_drivers_path, 76 _dri_link, 77 ) 78endif 79 80# This needs to be installed if any dri drivers (including gallium dri drivers) 81# are built. 82if with_dri 83 dri_req_private = [] 84 if dep_libdrm.found() 85 dri_req_private = ['libdrm >= ' + _drm_ver] 86 endif 87 88 pkg.generate( 89 name : 'dri', 90 filebase : 'dri', 91 description : 'Direct Rendering Infrastructure', 92 version : meson.project_version(), 93 variables : ['dridriverdir=' + dri_drivers_path], 94 requires_private : dri_req_private, 95 ) 96endif 97