meson.build revision 17ca54c3
117ca54c3Smrg# Copyright © 2018 Intel Corporation 217ca54c3Smrg 317ca54c3Smrg# Permission is hereby granted, free of charge, to any person obtaining a copy 417ca54c3Smrg# of this software and associated documentation files (the "Software"), to deal 517ca54c3Smrg# in the Software without restriction, including without limitation the rights 617ca54c3Smrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 717ca54c3Smrg# copies of the Software, and to permit persons to whom the Software is 817ca54c3Smrg# furnished to do so, subject to the following conditions: 917ca54c3Smrg 1017ca54c3Smrg# The above copyright notice and this permission notice shall be included in 1117ca54c3Smrg# all copies or substantial portions of the Software. 1217ca54c3Smrg 1317ca54c3Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1417ca54c3Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1517ca54c3Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1617ca54c3Smrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1717ca54c3Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1817ca54c3Smrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1917ca54c3Smrg# SOFTWARE. 2017ca54c3Smrg 2117ca54c3Smrgproject('xorgproto', 'c', license : 'MIT', version : '2018.4') 2217ca54c3Smrgpkg = import('pkgconfig') 2317ca54c3Smrgcc = meson.get_compiler('c') 2417ca54c3Smrgsed = find_program('sed') 2517ca54c3Smrg 2617ca54c3Smrgpcs = [ 2717ca54c3Smrg ['applewmproto', '1.4.2'], 2817ca54c3Smrg ['bigreqsproto', '1.1.2'], 2917ca54c3Smrg ['compositeproto', '0.4.2'], 3017ca54c3Smrg ['damageproto', '1.2.1'], 3117ca54c3Smrg ['dmxproto', '2.3.1'], 3217ca54c3Smrg ['dri2proto', '2.8'], 3317ca54c3Smrg ['dri3proto', '1.2'], 3417ca54c3Smrg ['fixesproto', '5.0'], 3517ca54c3Smrg ['fontsproto', '2.1.3'], 3617ca54c3Smrg ['glproto', '1.4.17'], 3717ca54c3Smrg ['inputproto', '2.3.2'], 3817ca54c3Smrg ['kbproto', '1.0.7'], 3917ca54c3Smrg ['presentproto', '1.2'], 4017ca54c3Smrg ['randrproto', '1.6.0'], 4117ca54c3Smrg ['recordproto', '1.14.2'], 4217ca54c3Smrg ['renderproto', '0.11.1'], 4317ca54c3Smrg ['resourceproto', '1.2.0'], 4417ca54c3Smrg ['scrnsaverproto', '1.2.2'], 4517ca54c3Smrg ['trapproto', '3.4.3'], 4617ca54c3Smrg ['videoproto', '2.3.3'], 4717ca54c3Smrg ['windowswmproto', '1.0.4'], 4817ca54c3Smrg ['xcmiscproto', '1.2.2'], 4917ca54c3Smrg ['xextproto', '7.3.0'], 5017ca54c3Smrg ['xf86bigfontproto', '1.2.0'], 5117ca54c3Smrg ['xf86dgaproto', '2.1'], 5217ca54c3Smrg ['xf86driproto', '2.1.1'], 5317ca54c3Smrg ['xf86miscproto', '0.9.3'], 5417ca54c3Smrg ['xf86vidmodeproto', '2.3.1'], 5517ca54c3Smrg ['xineramaproto', '1.2.1'], 5617ca54c3Smrg ['xproto', '7.0.32'], 5717ca54c3Smrg ['xproxymngproto', '1.0.3'], 5817ca54c3Smrg] 5917ca54c3Smrg 6017ca54c3Smrgforeach pc : pcs 6117ca54c3Smrg if pc[0] == 'xf86driproto' 6217ca54c3Smrg subdir = 'X11/dri' 6317ca54c3Smrg else 6417ca54c3Smrg subdir = '' 6517ca54c3Smrg endif 6617ca54c3Smrg pkg.generate( 6717ca54c3Smrg name : pc[0], 6817ca54c3Smrg filebase : pc[0], 6917ca54c3Smrg description : pc[0] + ' headers', 7017ca54c3Smrg version : pc[1], 7117ca54c3Smrg install_dir : get_option('datadir') + '/pkgconfig', 7217ca54c3Smrg subdirs : subdir, 7317ca54c3Smrg ) 7417ca54c3Smrgendforeach 7517ca54c3Smrg 7617ca54c3Smrgif get_option('legacy') == true 7717ca54c3Smrg legacy_pcs = [ 7817ca54c3Smrg ['evieproto', '1.1.1'], 7917ca54c3Smrg ['fontcacheproto', '0.1.3'], 8017ca54c3Smrg ['lg3dproto', '5.0'], 8117ca54c3Smrg ['printproto', '1.0.5'], 8217ca54c3Smrg ['xcalibrateproto', '0.1.0'], 8317ca54c3Smrg ['xf86rushproto', '1.2.2'], 8417ca54c3Smrg ] 8517ca54c3Smrg foreach pc : legacy_pcs 8617ca54c3Smrg pkg.generate( 8717ca54c3Smrg name : pc[0], 8817ca54c3Smrg filebase : pc[0], 8917ca54c3Smrg description : pc[0] + ' headers', 9017ca54c3Smrg version : pc[1], 9117ca54c3Smrg install_dir : get_option('datadir') + '/pkgconfig' 9217ca54c3Smrg ) 9317ca54c3Smrg endforeach 9417ca54c3Smrgendif 9517ca54c3Smrg 9617ca54c3Smrgext_xorgproto = declare_dependency( 9717ca54c3Smrg include_directories : include_directories('include') 9817ca54c3Smrg) 9917ca54c3Smrg 10017ca54c3Smrgsubdir('include') 101