meson.build revision 5395ea76
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 225395ea76Smrgproject('xorgproto', 'c', license : 'MIT', version : '2021.4') 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', 5417ca54c3Smrg] 5517ca54c3Smrg 56d63b911fSmrgpc_data = configuration_data() 57d63b911fSmrgpc_data.set('prefix', get_option('prefix')) 58d63b911fSmrg# meson does not allow installing the includedir outside of the prefix 59d63b911fSmrgpc_data.set('includedir', '${prefix}/' + get_option('includedir')) 60d63b911fSmrg 6117ca54c3Smrgforeach pc : pcs 62d63b911fSmrg configure_file( 63d63b911fSmrg input : pc + '.pc.in', 64d63b911fSmrg output : pc + '.pc', 6517ca54c3Smrg install_dir : get_option('datadir') + '/pkgconfig', 66d63b911fSmrg configuration : pc_data, 6717ca54c3Smrg ) 6817ca54c3Smrgendforeach 6917ca54c3Smrg 705395ea76Smrg 715395ea76Smrgdocs = files('compositeproto.txt', 725395ea76Smrg 'damageproto.txt', 735395ea76Smrg 'dri2proto.txt', 745395ea76Smrg 'dri3proto.txt', 755395ea76Smrg 'fixesproto.txt', 765395ea76Smrg 'PM_spec', 775395ea76Smrg 'presentproto.txt', 785395ea76Smrg 'randrproto.txt', 795395ea76Smrg 'renderproto.txt', 805395ea76Smrg 'resproto.txt', 815395ea76Smrg 'xv-protocol-v2.txt') 825395ea76Smrginstall_data(docs, 835395ea76Smrg install_dir: get_option('datadir') / 'doc' / 'xorgproto') 845395ea76Smrg 855395ea76Smrg 8617ca54c3Smrgif get_option('legacy') == true 8717ca54c3Smrg legacy_pcs = [ 88d63b911fSmrg 'evieproto', 89d63b911fSmrg 'fontcacheproto', 90d63b911fSmrg 'lg3dproto', 91d63b911fSmrg 'printproto', 92d63b911fSmrg 'trapproto', 93d63b911fSmrg 'windowswmproto', 94d63b911fSmrg 'xcalibrateproto', 95d63b911fSmrg 'xf86miscproto', 96d63b911fSmrg 'xf86rushproto', 97d63b911fSmrg 'xproxymngproto', 9817ca54c3Smrg ] 9917ca54c3Smrg foreach pc : legacy_pcs 100d63b911fSmrg configure_file( 101d63b911fSmrg input : pc + '.pc.in', 102d63b911fSmrg output : pc + '.pc', 103d63b911fSmrg install_dir : get_option('datadir') + '/pkgconfig', 104d63b911fSmrg configuration : pc_data, 10517ca54c3Smrg ) 10617ca54c3Smrg endforeach 10717ca54c3Smrgendif 10817ca54c3Smrg 10917ca54c3Smrgext_xorgproto = declare_dependency( 11017ca54c3Smrg include_directories : include_directories('include') 11117ca54c3Smrg) 11217ca54c3Smrg 11317ca54c3Smrgsubdir('include') 114d63b911fSmrg 115d63b911fSmrgkeysymfile = join_paths(meson.source_root(), 'include', 'X11', 'XF86keysym.h') 116d63b911fSmrgtest('evdev-keysym-check', 117d63b911fSmrg find_program('scripts/keysym-generator.py'), 118d63b911fSmrg args: ['-v', '--header', keysymfile, 'verify']) 119