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