1# Copyright © 2018 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 21# keep version in sync with configure.ac 22project('xorgproto', 'c', license : 'MIT', version : '2021.5') 23cc = meson.get_compiler('c') 24 25pcs = [ 26 'applewmproto', 27 'bigreqsproto', 28 'compositeproto', 29 'damageproto', 30 'dmxproto', 31 'dpmsproto', 32 'dri2proto', 33 'dri3proto', 34 'fixesproto', 35 'fontsproto', 36 'glproto', 37 'inputproto', 38 'kbproto', 39 'presentproto', 40 'randrproto', 41 'recordproto', 42 'renderproto', 43 'resourceproto', 44 'scrnsaverproto', 45 'videoproto', 46 'xcmiscproto', 47 'xextproto', 48 'xf86bigfontproto', 49 'xf86dgaproto', 50 'xf86driproto', 51 'xf86vidmodeproto', 52 'xineramaproto', 53 'xproto', 54] 55 56pc_data = configuration_data() 57pc_data.set('prefix', get_option('prefix')) 58# meson does not allow installing the includedir outside of the prefix 59pc_data.set('includedir', '${prefix}/' + get_option('includedir')) 60 61foreach pc : pcs 62 configure_file( 63 input : pc + '.pc.in', 64 output : pc + '.pc', 65 install_dir : get_option('datadir') + '/pkgconfig', 66 configuration : pc_data, 67 ) 68endforeach 69 70 71docs = files('compositeproto.txt', 72 'damageproto.txt', 73 'dri2proto.txt', 74 'dri3proto.txt', 75 'fixesproto.txt', 76 'PM_spec', 77 'presentproto.txt', 78 'randrproto.txt', 79 'renderproto.txt', 80 'resproto.txt', 81 'xv-protocol-v2.txt') 82install_data(docs, 83 install_dir: get_option('datadir') / 'doc' / 'xorgproto') 84 85 86if get_option('legacy') == true 87 legacy_pcs = [ 88 'evieproto', 89 'fontcacheproto', 90 'lg3dproto', 91 'printproto', 92 'trapproto', 93 'windowswmproto', 94 'xcalibrateproto', 95 'xf86miscproto', 96 'xf86rushproto', 97 'xproxymngproto', 98 ] 99 foreach pc : legacy_pcs 100 configure_file( 101 input : pc + '.pc.in', 102 output : pc + '.pc', 103 install_dir : get_option('datadir') + '/pkgconfig', 104 configuration : pc_data, 105 ) 106 endforeach 107endif 108 109ext_xorgproto = declare_dependency( 110 include_directories : include_directories('include') 111) 112 113subdir('include') 114 115keysymfile = join_paths(meson.source_root(), 'include', 'X11', 'XF86keysym.h') 116test('evdev-keysym-check', 117 find_program('scripts/keysym-generator.py'), 118 args: ['-v', '--header', keysymfile, 'verify']) 119