meson.build revision d63b911f
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 21d63b911fSmrgproject('xorgproto', 'c', license : 'MIT', version : '2021.3') 2217ca54c3Smrgcc = meson.get_compiler('c') 2317ca54c3Smrgsed = find_program('sed') 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 7017ca54c3Smrgif get_option('legacy') == true 7117ca54c3Smrg legacy_pcs = [ 72d63b911fSmrg 'evieproto', 73d63b911fSmrg 'fontcacheproto', 74d63b911fSmrg 'lg3dproto', 75d63b911fSmrg 'printproto', 76d63b911fSmrg 'trapproto', 77d63b911fSmrg 'windowswmproto', 78d63b911fSmrg 'xcalibrateproto', 79d63b911fSmrg 'xf86miscproto', 80d63b911fSmrg 'xf86rushproto', 81d63b911fSmrg 'xproxymngproto', 8217ca54c3Smrg ] 8317ca54c3Smrg foreach pc : legacy_pcs 84d63b911fSmrg configure_file( 85d63b911fSmrg input : pc + '.pc.in', 86d63b911fSmrg output : pc + '.pc', 87d63b911fSmrg install_dir : get_option('datadir') + '/pkgconfig', 88d63b911fSmrg configuration : pc_data, 8917ca54c3Smrg ) 9017ca54c3Smrg endforeach 9117ca54c3Smrgendif 9217ca54c3Smrg 9317ca54c3Smrgext_xorgproto = declare_dependency( 9417ca54c3Smrg include_directories : include_directories('include') 9517ca54c3Smrg) 9617ca54c3Smrg 9717ca54c3Smrgsubdir('include') 98d63b911fSmrg 99d63b911fSmrgkeysymfile = join_paths(meson.source_root(), 'include', 'X11', 'XF86keysym.h') 100d63b911fSmrgtest('evdev-keysym-check', 101d63b911fSmrg find_program('scripts/keysym-generator.py'), 102d63b911fSmrg args: ['-v', '--header', keysymfile, 'verify']) 103