Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 1 | # Copyright © 2017-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 | project( |
| 22 | 'libdrm', |
| 23 | ['c'], |
Simon Ser | febfe0a | 2021-11-25 21:33:02 +0100 | [diff] [blame] | 24 | version : '2.4.109', |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 25 | license : 'MIT', |
Marius Vlad | 67e9119 | 2021-02-01 13:23:20 +0200 | [diff] [blame] | 26 | meson_version : '>= 0.46', |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 27 | default_options : ['buildtype=debugoptimized', 'c_std=gnu99'], |
| 28 | ) |
| 29 | |
| 30 | pkg = import('pkgconfig') |
| 31 | |
Eric Engestrom | edaca47 | 2018-03-20 14:54:45 +0000 | [diff] [blame] | 32 | config = configuration_data() |
| 33 | |
Eric Engestrom | 361d4bf | 2018-03-20 14:59:40 +0000 | [diff] [blame] | 34 | config.set10('UDEV', get_option('udev')) |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 35 | with_freedreno_kgsl = get_option('freedreno-kgsl') |
| 36 | with_install_tests = get_option('install-test-programs') |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 37 | |
Jonathan Gray | 9eb6c8a | 2018-02-20 17:09:14 +1100 | [diff] [blame] | 38 | if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system()) |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 39 | dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4') |
| 40 | else |
| 41 | dep_pthread_stubs = [] |
| 42 | endif |
| 43 | dep_threads = dependency('threads') |
| 44 | |
| 45 | cc = meson.get_compiler('c') |
| 46 | |
Eric Anholt | a819b9a | 2021-04-22 16:03:38 -0700 | [diff] [blame] | 47 | android = cc.compiles('''int func() { return __ANDROID__; }''') |
| 48 | |
Eric Engestrom | 303cf6b | 2019-10-23 22:57:51 +0100 | [diff] [blame] | 49 | symbols_check = find_program('symbols-check.py') |
| 50 | prog_nm = find_program('nm') |
| 51 | |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 52 | # Check for atomics |
| 53 | intel_atomics = false |
| 54 | lib_atomics = false |
| 55 | |
Marius Vlad | 67e9119 | 2021-02-01 13:23:20 +0200 | [diff] [blame] | 56 | python3 = import('python').find_installation() |
| 57 | format_mod_static_table = custom_target('format_mod_static_table', |
| 58 | output : 'generated_static_table_fourcc.h', input: 'include/drm/drm_fourcc.h', |
| 59 | command : [python3, files('gen_table_fourcc.py'), '@INPUT@', '@OUTPUT@']) |
| 60 | |
Eric Engestrom | 5236de6 | 2018-02-07 14:20:52 +0000 | [diff] [blame] | 61 | dep_atomic_ops = dependency('atomic_ops', required : false) |
Peter Seiderer | 8de2696 | 2018-07-16 23:01:40 +0200 | [diff] [blame] | 62 | if cc.links(''' |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 63 | int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); } |
| 64 | int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); } |
Peter Seiderer | 8de2696 | 2018-07-16 23:01:40 +0200 | [diff] [blame] | 65 | int main() { } |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 66 | ''', |
| 67 | name : 'Intel Atomics') |
| 68 | intel_atomics = true |
| 69 | with_atomics = true |
Eric Engestrom | 5236de6 | 2018-02-07 14:20:52 +0000 | [diff] [blame] | 70 | dep_atomic_ops = [] |
| 71 | elif dep_atomic_ops.found() |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 72 | lib_atomics = true |
| 73 | with_atomics = true |
| 74 | elif cc.has_function('atomic_cas_uint') |
| 75 | with_atomics = true |
| 76 | else |
| 77 | with_atomics = false |
| 78 | endif |
| 79 | |
| 80 | config.set10('HAVE_LIBDRM_ATOMIC_PRIMITIVES', intel_atomics) |
| 81 | config.set10('HAVE_LIB_ATOMIC_OPS', lib_atomics) |
| 82 | |
| 83 | with_intel = false |
| 84 | _intel = get_option('intel') |
| 85 | if _intel != 'false' |
| 86 | if _intel == 'true' and not with_atomics |
| 87 | error('libdrm_intel requires atomics.') |
| 88 | else |
| 89 | with_intel = _intel == 'true' or host_machine.cpu_family().startswith('x86') |
| 90 | endif |
| 91 | endif |
| 92 | |
| 93 | with_radeon = false |
| 94 | _radeon = get_option('radeon') |
| 95 | if _radeon != 'false' |
| 96 | if _radeon == 'true' and not with_atomics |
| 97 | error('libdrm_radeon requires atomics.') |
| 98 | endif |
| 99 | with_radeon = true |
| 100 | endif |
| 101 | |
| 102 | with_amdgpu = false |
| 103 | _amdgpu = get_option('amdgpu') |
| 104 | if _amdgpu != 'false' |
| 105 | if _amdgpu == 'true' and not with_atomics |
| 106 | error('libdrm_amdgpu requires atomics.') |
| 107 | endif |
| 108 | with_amdgpu = true |
| 109 | endif |
| 110 | |
| 111 | with_nouveau = false |
| 112 | _nouveau = get_option('nouveau') |
| 113 | if _nouveau != 'false' |
| 114 | if _nouveau == 'true' and not with_atomics |
| 115 | error('libdrm_nouveau requires atomics.') |
| 116 | endif |
| 117 | with_nouveau = true |
| 118 | endif |
| 119 | |
| 120 | with_vmwgfx = false |
| 121 | _vmwgfx = get_option('vmwgfx') |
| 122 | if _vmwgfx != 'false' |
| 123 | with_vmwgfx = true |
| 124 | endif |
| 125 | |
| 126 | with_omap = false |
| 127 | _omap = get_option('omap') |
| 128 | if _omap == 'true' |
| 129 | if not with_atomics |
| 130 | error('libdrm_omap requires atomics.') |
| 131 | endif |
| 132 | with_omap = true |
| 133 | endif |
| 134 | |
| 135 | with_freedreno = false |
| 136 | _freedreno = get_option('freedreno') |
| 137 | if _freedreno != 'false' |
| 138 | if _freedreno == 'true' and not with_atomics |
| 139 | error('libdrm_freedreno requires atomics.') |
| 140 | else |
| 141 | with_freedreno = _freedreno == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family()) |
| 142 | endif |
| 143 | endif |
| 144 | |
| 145 | with_tegra = false |
| 146 | _tegra = get_option('tegra') |
| 147 | if _tegra == 'true' |
| 148 | if not with_atomics |
| 149 | error('libdrm_tegra requires atomics.') |
| 150 | endif |
| 151 | with_tegra = true |
| 152 | endif |
| 153 | |
| 154 | with_etnaviv = false |
| 155 | _etnaviv = get_option('etnaviv') |
| 156 | if _etnaviv == 'true' |
| 157 | if not with_atomics |
| 158 | error('libdrm_etnaviv requires atomics.') |
| 159 | endif |
| 160 | with_etnaviv = true |
| 161 | endif |
| 162 | |
| 163 | with_exynos = get_option('exynos') == 'true' |
| 164 | |
| 165 | with_vc4 = false |
| 166 | _vc4 = get_option('vc4') |
| 167 | if _vc4 != 'false' |
| 168 | with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family()) |
| 169 | endif |
| 170 | |
Eric Engestrom | 360292c | 2018-12-19 14:55:45 +0000 | [diff] [blame] | 171 | # XXX: Apparently only freebsd and dragonfly bsd actually need this (and |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 172 | # gnu/kfreebsd), not openbsd and netbsd |
| 173 | with_libkms = false |
| 174 | _libkms = get_option('libkms') |
| 175 | if _libkms != 'false' |
Eric Anholt | e6fb9cc | 2021-04-22 16:25:07 -0700 | [diff] [blame] | 176 | with_libkms = _libkms == 'true' or (['linux', 'freebsd', 'dragonfly'].contains(host_machine.system()) and not android) |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 177 | endif |
| 178 | |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 179 | # Among others FreeBSD does not have a separate dl library. |
| 180 | if not cc.has_function('dlsym') |
| 181 | dep_dl = cc.find_library('dl', required : with_nouveau) |
| 182 | else |
| 183 | dep_dl = [] |
| 184 | endif |
| 185 | # clock_gettime might require -rt, or it might not. find out |
| 186 | if not cc.has_function('clock_gettime', prefix : '#define _GNU_SOURCE\n#include <time.h>') |
| 187 | # XXX: untested |
| 188 | dep_rt = cc.find_library('rt') |
| 189 | else |
| 190 | dep_rt = [] |
| 191 | endif |
| 192 | dep_m = cc.find_library('m', required : false) |
Eric Engestrom | 1f8ada8 | 2020-03-29 22:45:52 +0200 | [diff] [blame] | 193 | |
| 194 | # The header is not required on Linux, and is in fact deprecated in glibc 2.30+ |
| 195 | if ['linux'].contains(host_machine.system()) |
| 196 | config.set10('HAVE_SYS_SYSCTL_H', false) |
| 197 | else |
| 198 | # From Niclas Zeising: |
| 199 | # FreeBSD requires sys/types.h for sys/sysctl.h, so add it as part of |
| 200 | # the includes when checking for headers. |
| 201 | config.set10('HAVE_SYS_SYSCTL_H', |
| 202 | cc.compiles('#include <sys/types.h>\n#include <sys/sysctl.h>', name : 'sys/sysctl.h works')) |
| 203 | endif |
| 204 | |
| 205 | foreach header : ['sys/select.h', 'alloca.h'] |
Eric Engestrom | 074947e | 2018-11-07 15:00:24 +0000 | [diff] [blame] | 206 | config.set10('HAVE_' + header.underscorify().to_upper(), |
Eric Engestrom | 1f8ada8 | 2020-03-29 22:45:52 +0200 | [diff] [blame] | 207 | cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header))) |
Eric Engestrom | 2bd461e | 2018-03-12 16:17:55 +0000 | [diff] [blame] | 208 | endforeach |
Eric Engestrom | 1f8ada8 | 2020-03-29 22:45:52 +0200 | [diff] [blame] | 209 | |
Eric Engestrom | 827a2a2 | 2019-09-14 22:22:03 +0100 | [diff] [blame] | 210 | if (cc.has_header_symbol('sys/sysmacros.h', 'major') and |
| 211 | cc.has_header_symbol('sys/sysmacros.h', 'minor') and |
| 212 | cc.has_header_symbol('sys/sysmacros.h', 'makedev')) |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 213 | config.set10('MAJOR_IN_SYSMACROS', true) |
Eric Engestrom | 827a2a2 | 2019-09-14 22:22:03 +0100 | [diff] [blame] | 214 | endif |
| 215 | if (cc.has_header_symbol('sys/mkdev.h', 'major') and |
| 216 | cc.has_header_symbol('sys/mkdev.h', 'minor') and |
| 217 | cc.has_header_symbol('sys/mkdev.h', 'makedev')) |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 218 | config.set10('MAJOR_IN_MKDEV', true) |
| 219 | endif |
Eric Engestrom | 1a44bba | 2018-01-26 17:04:28 +0000 | [diff] [blame] | 220 | config.set10('HAVE_OPEN_MEMSTREAM', cc.has_function('open_memstream')) |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 221 | |
| 222 | warn_c_args = [] |
Eric Engestrom | ba17673 | 2018-01-26 11:18:03 +0000 | [diff] [blame] | 223 | foreach a : ['-Wall', '-Wextra', '-Wsign-compare', '-Werror=undef', |
Eric Engestrom | 8c1fddc | 2018-11-07 16:50:06 +0000 | [diff] [blame] | 224 | '-Werror=implicit-function-declaration', '-Wpointer-arith', |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 225 | '-Wwrite-strings', '-Wstrict-prototypes', '-Wmissing-prototypes', |
| 226 | '-Wmissing-declarations', '-Wnested-externs', '-Wpacked', |
Eric Engestrom | 8177d73 | 2018-01-26 11:18:30 +0000 | [diff] [blame] | 227 | '-Wswitch-enum', '-Wmissing-format-attribute', |
| 228 | '-Wstrict-aliasing=2', '-Winit-self', '-Winline', '-Wshadow', |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 229 | '-Wdeclaration-after-statement', '-Wold-style-definition'] |
| 230 | if cc.has_argument(a) |
| 231 | warn_c_args += a |
| 232 | endif |
| 233 | endforeach |
| 234 | # GCC will never error for -Wno-*, so check for -W* then add -Wno-* to the list |
| 235 | # of options |
Eric Engestrom | 8177d73 | 2018-01-26 11:18:30 +0000 | [diff] [blame] | 236 | foreach a : ['unused-parameter', 'attributes', 'long-long', |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 237 | 'missing-field-initializers'] |
| 238 | if cc.has_argument('-W@0@'.format(a)) |
| 239 | warn_c_args += '-Wno-@0@'.format(a) |
| 240 | endif |
| 241 | endforeach |
| 242 | |
Lucas De Marchi | ba80825 | 2018-09-12 13:24:12 -0700 | [diff] [blame] | 243 | # all c args: |
| 244 | libdrm_c_args = warn_c_args + ['-fvisibility=hidden'] |
| 245 | |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 246 | |
| 247 | dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel) |
| 248 | dep_cunit = dependency('cunit', version : '>= 2.1', required : false) |
Igor Gnatenko | 9411f8e | 2018-02-19 13:55:27 +0100 | [diff] [blame] | 249 | _cairo_tests = get_option('cairo-tests') |
| 250 | if _cairo_tests != 'false' |
| 251 | dep_cairo = dependency('cairo', required : _cairo_tests == 'true') |
| 252 | with_cairo_tests = dep_cairo.found() |
| 253 | else |
| 254 | dep_cairo = [] |
| 255 | with_cairo_tests = false |
| 256 | endif |
| 257 | _valgrind = get_option('valgrind') |
| 258 | if _valgrind != 'false' |
Jose Maria Casanova Crespo | c997baf | 2020-05-05 21:50:33 +0200 | [diff] [blame] | 259 | if with_freedreno |
| 260 | dep_valgrind = dependency('valgrind', required : _valgrind == 'true', version : '>=3.10.0') |
| 261 | else |
| 262 | dep_valgrind = dependency('valgrind', required : _valgrind == 'true') |
| 263 | endif |
Igor Gnatenko | 9411f8e | 2018-02-19 13:55:27 +0100 | [diff] [blame] | 264 | with_valgrind = dep_valgrind.found() |
| 265 | else |
| 266 | dep_valgrind = [] |
| 267 | with_valgrind = false |
| 268 | endif |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 269 | |
| 270 | with_man_pages = get_option('man-pages') |
Heiko Becker | 62b9a3e | 2021-01-15 21:11:41 +0100 | [diff] [blame] | 271 | prog_rst2man = find_program('rst2man', 'rst2man.py', required: with_man_pages == 'true') |
Simon Ser | 05b0a95 | 2020-06-03 11:58:07 +0200 | [diff] [blame] | 272 | with_man_pages = with_man_pages != 'false' and prog_rst2man.found() |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 273 | |
Eric Engestrom | e8d3d88 | 2018-03-16 17:07:08 +0000 | [diff] [blame] | 274 | config.set10('HAVE_VISIBILITY', |
| 275 | cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''', |
| 276 | name : 'compiler supports __attribute__(("hidden"))')) |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 277 | |
Eric Engestrom | 5457e00 | 2018-01-26 16:23:01 +0000 | [diff] [blame] | 278 | foreach t : [ |
Eric Engestrom | 2cd9105 | 2018-01-26 16:17:53 +0000 | [diff] [blame] | 279 | [with_exynos, 'EXYNOS'], |
Eric Engestrom | ec53f48 | 2018-01-26 15:19:03 +0000 | [diff] [blame] | 280 | [with_freedreno_kgsl, 'FREEDRENO_KGSL'], |
Eric Engestrom | 5457e00 | 2018-01-26 16:23:01 +0000 | [diff] [blame] | 281 | [with_intel, 'INTEL'], |
| 282 | [with_nouveau, 'NOUVEAU'], |
| 283 | [with_radeon, 'RADEON'], |
| 284 | [with_vc4, 'VC4'], |
| 285 | [with_vmwgfx, 'VMWGFX'], |
Igor Gnatenko | 9411f8e | 2018-02-19 13:55:27 +0100 | [diff] [blame] | 286 | [with_cairo_tests, 'CAIRO'], |
| 287 | [with_valgrind, 'VALGRIND'], |
Eric Engestrom | 5457e00 | 2018-01-26 16:23:01 +0000 | [diff] [blame] | 288 | ] |
Eric Engestrom | ee47329 | 2018-01-26 16:21:30 +0000 | [diff] [blame] | 289 | config.set10('HAVE_@0@'.format(t[1]), t[0]) |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 290 | endforeach |
Eric Engestrom | ec53f48 | 2018-01-26 15:19:03 +0000 | [diff] [blame] | 291 | if with_freedreno_kgsl and not with_freedreno |
| 292 | error('cannot enable freedreno-kgsl without freedreno support') |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 293 | endif |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 294 | config.set10('_GNU_SOURCE', true) |
| 295 | config_file = configure_file( |
| 296 | configuration : config, |
| 297 | output : 'config.h', |
| 298 | ) |
Scott Anderson | c70bd7b | 2019-12-17 22:08:02 +1300 | [diff] [blame] | 299 | add_project_arguments('-include', '@0@'.format(config_file), language : 'c') |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 300 | |
| 301 | inc_root = include_directories('.') |
| 302 | inc_drm = include_directories('include/drm') |
| 303 | |
Eric Anholt | a819b9a | 2021-04-22 16:03:38 -0700 | [diff] [blame] | 304 | libdrm_files = [files( |
| 305 | 'xf86drm.c', 'xf86drmHash.c', 'xf86drmRandom.c', 'xf86drmSL.c', |
| 306 | 'xf86drmMode.c' |
| 307 | ), |
| 308 | config_file, format_mod_static_table |
| 309 | ] |
| 310 | |
| 311 | if android |
| 312 | libdrm = library('drm', libdrm_files, |
| 313 | c_args : libdrm_c_args, |
| 314 | dependencies : [dep_valgrind, dep_rt, dep_m], |
| 315 | include_directories : inc_drm, |
| 316 | install : true, |
| 317 | ) |
| 318 | else |
| 319 | libdrm = library('drm', libdrm_files, |
| 320 | c_args : libdrm_c_args, |
| 321 | dependencies : [dep_valgrind, dep_rt, dep_m], |
| 322 | include_directories : inc_drm, |
| 323 | install : true, |
| 324 | version: '2.4.0' |
| 325 | ) |
| 326 | endif |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 327 | |
Eric Engestrom | 077e642 | 2019-11-11 23:51:04 +0000 | [diff] [blame] | 328 | test( |
| 329 | 'core-symbols-check', |
| 330 | symbols_check, |
| 331 | args : [ |
| 332 | '--lib', libdrm, |
| 333 | '--symbols-file', files('core-symbols.txt'), |
| 334 | '--nm', prog_nm.path(), |
| 335 | ], |
| 336 | ) |
| 337 | |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 338 | ext_libdrm = declare_dependency( |
| 339 | link_with : libdrm, |
Dylan Baker | deb5978 | 2018-02-07 15:35:24 -0800 | [diff] [blame] | 340 | include_directories : [inc_root, inc_drm], |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 341 | ) |
| 342 | |
| 343 | install_headers('libsync.h', 'xf86drm.h', 'xf86drmMode.h') |
| 344 | install_headers( |
| 345 | 'include/drm/drm.h', 'include/drm/drm_fourcc.h', 'include/drm/drm_mode.h', |
| 346 | 'include/drm/drm_sarea.h', 'include/drm/i915_drm.h', |
| 347 | 'include/drm/mach64_drm.h', 'include/drm/mga_drm.h', |
Tanmay Shah | f0c642e | 2018-08-13 17:29:21 -0700 | [diff] [blame] | 348 | 'include/drm/msm_drm.h', 'include/drm/nouveau_drm.h', |
| 349 | 'include/drm/qxl_drm.h', 'include/drm/r128_drm.h', |
| 350 | 'include/drm/radeon_drm.h', 'include/drm/amdgpu_drm.h', |
| 351 | 'include/drm/savage_drm.h', 'include/drm/sis_drm.h', |
| 352 | 'include/drm/tegra_drm.h', 'include/drm/vc4_drm.h', |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 353 | 'include/drm/via_drm.h', 'include/drm/virtgpu_drm.h', |
| 354 | subdir : 'libdrm', |
| 355 | ) |
| 356 | if with_vmwgfx |
| 357 | install_headers('include/drm/vmwgfx_drm.h', subdir : 'libdrm') |
| 358 | endif |
| 359 | |
| 360 | pkg.generate( |
| 361 | name : 'libdrm', |
| 362 | libraries : libdrm, |
| 363 | subdirs : ['.', 'libdrm'], |
| 364 | version : meson.project_version(), |
| 365 | description : 'Userspace interface to kernel DRM services', |
| 366 | ) |
Eric Engestrom | 8177d73 | 2018-01-26 11:18:30 +0000 | [diff] [blame] | 367 | |
Dylan Baker | 5f7deb5 | 2017-09-13 11:46:13 -0700 | [diff] [blame] | 368 | if with_libkms |
| 369 | subdir('libkms') |
| 370 | endif |
| 371 | if with_intel |
| 372 | subdir('intel') |
| 373 | endif |
| 374 | if with_nouveau |
| 375 | subdir('nouveau') |
| 376 | endif |
| 377 | if with_radeon |
| 378 | subdir('radeon') |
| 379 | endif |
| 380 | if with_amdgpu |
| 381 | subdir('amdgpu') |
| 382 | endif |
| 383 | if with_omap |
| 384 | subdir('omap') |
| 385 | endif |
| 386 | if with_exynos |
| 387 | subdir('exynos') |
| 388 | endif |
| 389 | if with_freedreno |
| 390 | subdir('freedreno') |
| 391 | endif |
| 392 | if with_tegra |
| 393 | subdir('tegra') |
| 394 | endif |
| 395 | if with_vc4 |
| 396 | subdir('vc4') |
| 397 | endif |
| 398 | if with_etnaviv |
| 399 | subdir('etnaviv') |
| 400 | endif |
| 401 | if with_man_pages |
| 402 | subdir('man') |
| 403 | endif |
| 404 | subdir('data') |
| 405 | subdir('tests') |
Eric Engestrom | 7a58c21 | 2018-02-26 15:42:18 +0000 | [diff] [blame] | 406 | |
| 407 | message('') |
| 408 | message('@0@ will be compiled with:'.format(meson.project_name())) |
| 409 | message('') |
| 410 | message(' libkms @0@'.format(with_libkms)) |
| 411 | message(' Intel API @0@'.format(with_intel)) |
| 412 | message(' vmwgfx API @0@'.format(with_vmwgfx)) |
| 413 | message(' Radeon API @0@'.format(with_radeon)) |
| 414 | message(' AMDGPU API @0@'.format(with_amdgpu)) |
| 415 | message(' Nouveau API @0@'.format(with_nouveau)) |
| 416 | message(' OMAP API @0@'.format(with_omap)) |
| 417 | message(' EXYNOS API @0@'.format(with_exynos)) |
| 418 | message(' Freedreno API @0@ (kgsl: @1@)'.format(with_freedreno, with_freedreno_kgsl)) |
| 419 | message(' Tegra API @0@'.format(with_tegra)) |
| 420 | message(' VC4 API @0@'.format(with_vc4)) |
| 421 | message(' Etnaviv API @0@'.format(with_etnaviv)) |
| 422 | message('') |