meson.build revision 452262e1
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 215395ea76Smrg# keep version in sync with configure.ac 22452262e1Smrgproject('xorgproto', 'c', license : 'MIT', version : '2022.2') 2317ca54c3Smrgcc = meson.get_compiler('c') 2417ca54c3Smrg 2517ca54c3Smrgpcs = [ 26d63b911fSmrg 'applewmproto', 27d63b911fSmrg 'bigreqsproto', 28d63b911fSmrg 'compositeproto', 29d63b911fSmrg 'damageproto', 30d63b911fSmrg 'dmxproto', 31d63b911fSmrg 'dpmsproto', 32d63b911fSmrg 'dri2proto', 33d63b911fSmrg 'dri3proto', 34d63b911fSmrg 'fixesproto', 35d63b911fSmrg 'fontsproto', 36d63b911fSmrg 'glproto', 37d63b911fSmrg 'inputproto', 38d63b911fSmrg 'kbproto', 39d63b911fSmrg 'presentproto', 40d63b911fSmrg 'randrproto', 41d63b911fSmrg 'recordproto', 42d63b911fSmrg 'renderproto', 43d63b911fSmrg 'resourceproto', 44d63b911fSmrg 'scrnsaverproto', 45d63b911fSmrg 'videoproto', 46d63b911fSmrg 'xcmiscproto', 47d63b911fSmrg 'xextproto', 48d63b911fSmrg 'xf86bigfontproto', 49d63b911fSmrg 'xf86dgaproto', 50d63b911fSmrg 'xf86driproto', 51d63b911fSmrg 'xf86vidmodeproto', 52d63b911fSmrg 'xineramaproto', 53d63b911fSmrg 'xproto', 54452262e1Smrg 'xwaylandproto', 5517ca54c3Smrg] 5617ca54c3Smrg 57d63b911fSmrgpc_data = configuration_data() 58d63b911fSmrgpc_data.set('prefix', get_option('prefix')) 59d63b911fSmrg# meson does not allow installing the includedir outside of the prefix 60d63b911fSmrgpc_data.set('includedir', '${prefix}/' + get_option('includedir')) 61d63b911fSmrg 6217ca54c3Smrgforeach pc : pcs 63d63b911fSmrg configure_file( 64d63b911fSmrg input : pc + '.pc.in', 65d63b911fSmrg output : pc + '.pc', 6617ca54c3Smrg install_dir : get_option('datadir') + '/pkgconfig', 67d63b911fSmrg configuration : pc_data, 6817ca54c3Smrg ) 6917ca54c3Smrgendforeach 7017ca54c3Smrg 715395ea76Smrg 725395ea76Smrgdocs = files('compositeproto.txt', 735395ea76Smrg 'damageproto.txt', 745395ea76Smrg 'dri2proto.txt', 755395ea76Smrg 'dri3proto.txt', 765395ea76Smrg 'fixesproto.txt', 775395ea76Smrg 'PM_spec', 785395ea76Smrg 'presentproto.txt', 795395ea76Smrg 'randrproto.txt', 805395ea76Smrg 'renderproto.txt', 815395ea76Smrg 'resproto.txt', 82452262e1Smrg 'xv-protocol-v2.txt', 83452262e1Smrg 'xwaylandproto.txt') 845395ea76Smrginstall_data(docs, 855395ea76Smrg install_dir: get_option('datadir') / 'doc' / 'xorgproto') 865395ea76Smrg 875395ea76Smrg 8817ca54c3Smrgif get_option('legacy') == true 8917ca54c3Smrg legacy_pcs = [ 90d63b911fSmrg 'evieproto', 91d63b911fSmrg 'fontcacheproto', 92d63b911fSmrg 'lg3dproto', 93d63b911fSmrg 'printproto', 94d63b911fSmrg 'trapproto', 95d63b911fSmrg 'windowswmproto', 96d63b911fSmrg 'xcalibrateproto', 97d63b911fSmrg 'xf86miscproto', 98d63b911fSmrg 'xf86rushproto', 99d63b911fSmrg 'xproxymngproto', 10017ca54c3Smrg ] 10117ca54c3Smrg foreach pc : legacy_pcs 102d63b911fSmrg configure_file( 103d63b911fSmrg input : pc + '.pc.in', 104d63b911fSmrg output : pc + '.pc', 105d63b911fSmrg install_dir : get_option('datadir') + '/pkgconfig', 106d63b911fSmrg configuration : pc_data, 10717ca54c3Smrg ) 10817ca54c3Smrg endforeach 10917ca54c3Smrgendif 11017ca54c3Smrg 11117ca54c3Smrgext_xorgproto = declare_dependency( 11217ca54c3Smrg include_directories : include_directories('include') 11317ca54c3Smrg) 11417ca54c3Smrg 11517ca54c3Smrgsubdir('include') 116d63b911fSmrg 117d63b911fSmrgkeysymfile = join_paths(meson.source_root(), 'include', 'X11', 'XF86keysym.h') 118d63b911fSmrgtest('evdev-keysym-check', 119d63b911fSmrg find_program('scripts/keysym-generator.py'), 120d63b911fSmrg args: ['-v', '--header', keysymfile, 'verify']) 121