Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

meson.build 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. # Copyright © 2017 Intel Corporation
  2. # Permission is hereby granted, free of charge, to any person obtaining a copy
  3. # of this software and associated documentation files (the "Software"), to deal
  4. # in the Software without restriction, including without limitation the rights
  5. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  6. # copies of the Software, and to permit persons to whom the Software is
  7. # furnished to do so, subject to the following conditions:
  8. # The above copyright notice and this permission notice shall be included in
  9. # all copies or substantial portions of the Software.
  10. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  11. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  12. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  13. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  14. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  15. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  16. # SOFTWARE.
  17. project('mesa', ['c', 'cpp'], version : '17.3.0-devel', license : 'MIT',
  18. default_options : ['c_std=c99', 'cpp_std=c++11'])
  19. # Arguments for the preprocessor, put these in a separate array from the C and
  20. # C++ (cpp in meson terminology) arguments since they need to be added to the
  21. # default arguments for both C and C++.
  22. pre_args = [
  23. '-D__STDC_CONSTANT_MACROS',
  24. '-D__STDC_FORMAT_MACROS',
  25. '-D__STDC_LIMIT_MACROS',
  26. '-DVERSION="@0@"'.format(meson.project_version()),
  27. '-DPACKAGE_VERSION=VERSION',
  28. '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa"',
  29. ]
  30. with_vulkan_icd_dir = get_option('vulkan-icd-dir')
  31. with_tests = get_option('build-tests')
  32. with_valgrind = get_option('valgrind')
  33. with_asm = get_option('asm')
  34. # XXX: yeah, do these
  35. with_appledri = false
  36. with_windowsdri = false
  37. with_gles1 = get_option('gles1')
  38. with_gles2 = get_option('gles2')
  39. with_opengl = get_option('opengl')
  40. with_any_opengl = with_opengl or with_gles1 or with_gles2
  41. # Only build shared_glapi if at least one OpenGL API is enabled
  42. with_shared_glapi = get_option('shared-glapi') and with_any_opengl
  43. # TODO: these will need options, but at the moment they just control header
  44. # installs
  45. with_osmesa = false
  46. # shared-glapi is required if at least two OpenGL APIs are being built
  47. if not with_shared_glapi
  48. if ((with_gles1 and with_gles2) or (with_gles1 and with_opengl)
  49. or (with_gles2 and with_opengl))
  50. error('shared-glapi required for building two or more of OpenGL, OpenGL ES 1.x, OpenGL ES 2.x')
  51. endif
  52. endif
  53. # We require OpenGL for OpenGL ES
  54. if (with_gles1 or with_gles2) and not with_opengl
  55. error('building OpenGL ES without OpenGL is not supported.')
  56. endif
  57. with_dri = false
  58. with_dri_i965 = false
  59. _drivers = get_option('dri-drivers')
  60. if _drivers != ''
  61. _split = _drivers.split(',')
  62. with_dri_i965 = _split.contains('i965')
  63. with_dri = true
  64. endif
  65. if not with_dri
  66. with_gles1 = false
  67. with_gles2 = false
  68. with_opengl = false
  69. with_any_opengl = false
  70. with_shared_glapi = false
  71. endif
  72. # TODO: other OSes
  73. with_dri_platform = 'drm'
  74. with_gallium = false
  75. # TODO: gallium drivers
  76. # TODO: conditionalize libdrm requirement
  77. dep_libdrm = dependency('libdrm', version : '>= 2.4.75')
  78. pre_args += '-DHAVE_LIBDRM'
  79. with_dri2 = with_dri_platform == 'drm' and dep_libdrm.found()
  80. with_dri3 = get_option('dri3')
  81. if with_dri3 == 'auto'
  82. if host_machine.system() == 'linux'
  83. with_dri3 = true
  84. else
  85. with_dri3 = false
  86. endif
  87. elif with_dri3 == 'yes'
  88. with_dri3 = true
  89. else
  90. with_dri3 = false
  91. endif
  92. # TODO: there are more platforms required for non-vulkan drivers
  93. with_platform_wayland = false
  94. with_platform_x11 = false
  95. _platforms = get_option('platforms')
  96. if _platforms != ''
  97. _split = _platforms.split(',')
  98. with_platform_x11 = _split.contains('x11')
  99. with_platform_wayland = _split.contains('wayland')
  100. endif
  101. with_glx = get_option('glx')
  102. if with_glx != 'disabled'
  103. pre_args += '-DGLX_USE_TLS'
  104. if not (with_platform_x11 and with_any_opengl) and with_glx != 'auto'
  105. error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
  106. elif with_glx == 'gallium-xlib'
  107. if not with_gallium
  108. error('Gallium-xlib based GLX requires at least one gallium driver')
  109. elif with_dri
  110. error('gallium-xlib conflicts with any dri driver')
  111. endif
  112. elif with_glx == 'dri' and not with_dri
  113. error('dri based GLX requires at least one DRI driver')
  114. elif with_glx == 'auto'
  115. if with_dri
  116. with_glx = 'dri'
  117. elif with_gallium
  118. with_glx = 'gallium-xlib'
  119. elif with_platform_x11 and with_any_opengl
  120. with_glx = 'xlib'
  121. else
  122. with_glx = 'disabled'
  123. endif
  124. endif
  125. endif
  126. with_glvnd = get_option('glvnd')
  127. if with_glvnd and with_glx != 'dri'
  128. message('glvnd requires dri based glx')
  129. endif
  130. # TODO: toggle for this
  131. with_glx_direct = true
  132. if with_vulkan_icd_dir == ''
  133. with_vulkan_icd_dir = join_paths(get_option('datadir'), 'vulkan/icd.d')
  134. endif
  135. with_intel_vk = false
  136. with_amd_vk = false
  137. with_any_vk = false
  138. _vulkan_drivers = get_option('vulkan-drivers')
  139. if _vulkan_drivers != ''
  140. _split = _vulkan_drivers.split(',')
  141. with_intel_vk = _split.contains('intel')
  142. with_amd_vk = _split.contains('amd')
  143. with_any_vk = with_amd_vk or with_intel_vk
  144. if not (with_platform_x11 or with_platform_wayland)
  145. error('Vulkan requires at least one platform (x11, wayland)')
  146. endif
  147. if with_platform_x11 and not with_dri3
  148. error('Vulkan drivers require dri3 for X11 support')
  149. endif
  150. endif
  151. if with_dri # TODO: or gallium
  152. if with_glx == 'disabled' # TODO: or egl
  153. error('building dri or gallium drivers require at least one window system')
  154. endif
  155. endif
  156. prog_python2 = find_program('python2')
  157. has_mako = run_command(prog_python2, '-c', 'import mako')
  158. if has_mako.returncode() != 0
  159. error('Python (2.x) mako module required to build mesa.')
  160. endif
  161. cc = meson.get_compiler('c')
  162. if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
  163. error('When using GCC, version 4.4.6 or later is required.')
  164. endif
  165. # Define DEBUG for debug and debugoptimized builds
  166. if get_option('buildtype').startswith('debug')
  167. pre_args += '-DDEBUG'
  168. endif
  169. if get_option('shader-cache')
  170. pre_args += '-DENABLE_SHADER_CACHE'
  171. elif with_amd_vk
  172. error('Radv requires shader cache support')
  173. endif
  174. # Check for GCC style builtins
  175. foreach b : ['bswap32', 'bswap64', 'clz', 'clzll', 'ctz', 'expect', 'ffs',
  176. 'ffsll', 'popcount', 'popcountll', 'unreachable']
  177. if cc.has_function(b)
  178. pre_args += '-DHAVE___BUILTIN_@0@'.format(b.to_upper())
  179. endif
  180. endforeach
  181. # check for GCC __attribute__
  182. foreach a : ['const', 'flatten', 'malloc', 'pure', 'unused',
  183. 'warn_unused_result', 'weak',]
  184. if cc.compiles('int foo(void) __attribute__((@0@));'.format(a),
  185. name : '__attribute__((@0@))'.format(a))
  186. pre_args += '-DHAVE_FUNC_ATTRIBUTE_@0@'.format(a.to_upper())
  187. endif
  188. endforeach
  189. if cc.compiles('int foo(const char *p, ...) __attribute__((format(printf, 1, 2)));',
  190. name : '__attribute__((format(...)))')
  191. pre_args += '-DHAVE_FUNC_ATTRIBUTE_FORMAT'
  192. endif
  193. if cc.compiles('struct __attribute__((packed)) foo { int bar; };',
  194. name : '__attribute__((packed))')
  195. pre_args += '-DHAVE_FUNC_ATTRIBUTE_PACKED'
  196. endif
  197. if cc.compiles('int *foo(void) __attribute__((returns_nonnull));',
  198. name : '__attribute__((returns_nonnull))')
  199. pre_args += '-DHAVE_FUNC_ATTRIBUTE_NONNULL'
  200. endif
  201. if cc.compiles('''int foo_def(void) __attribute__((visibility("default")));
  202. int foo_hid(void) __attribute__((visibility("hidden")));
  203. int foo_int(void) __attribute__((visibility("internal")));
  204. int foo_pro(void) __attribute__((visibility("protected")));''',
  205. name : '__attribute__((visibility(...)))')
  206. pre_args += '-DHAVE_FUNC_ATTRIBUTE_VISBILITY'
  207. endif
  208. if cc.compiles('int foo(void) { return 0; } int bar(void) __attribute__((alias("foo")));',
  209. name : '__attribute__((alias(...)))')
  210. pre_args += '-DHAVE_FUNC_ATTRIBUTE_ALIAS'
  211. endif
  212. # TODO: this is very incomplete
  213. if host_machine.system() == 'linux'
  214. pre_args += '-D_GNU_SOURCE'
  215. endif
  216. # Check for generic C arguments
  217. c_args = []
  218. foreach a : ['-Wall', '-Werror=implicit-function-declaration',
  219. '-Werror=missing-prototypes', '-fno-math-errno',
  220. '-fno-trapping-math', '-Qunused-arguments']
  221. if cc.has_argument(a)
  222. c_args += a
  223. endif
  224. endforeach
  225. c_vis_args = []
  226. if cc.has_argument('-fvisibility=hidden')
  227. c_vis_args += '-fvisibility=hidden'
  228. endif
  229. # Check for generic C++ arguments
  230. cpp = meson.get_compiler('cpp')
  231. cpp_args = []
  232. foreach a : ['-Wall', '-fno-math-errno', '-fno-trapping-math',
  233. '-Qunused-arguments', '-Wno-non-virtual-dtor']
  234. if cpp.has_argument(a)
  235. cpp_args += a
  236. endif
  237. endforeach
  238. cpp_vis_args = []
  239. if cpp.has_argument('-fvisibility=hidden')
  240. cpp_vis_args += '-fvisibility=hidden'
  241. endif
  242. # Check for C and C++ arguments for MSVC2013 compatibility. These are only used
  243. # in parts of the mesa code base that need to compile with old versions of
  244. # MSVC, mainly common code
  245. c_msvc_compat_args = []
  246. cpp_msvc_compat_args = []
  247. foreach a : ['-Werror=pointer-arith', '-Werror=vla']
  248. if cc.has_argument(a)
  249. c_msvc_compat_args += a
  250. endif
  251. if cpp.has_argument(a)
  252. cpp_msvc_compat_args += a
  253. endif
  254. endforeach
  255. no_override_init_args = []
  256. foreach a : ['-Wno-override-init', '-Wno-initializer-overrides']
  257. if cc.has_argument(a)
  258. no_override_init_args += a
  259. endif
  260. endforeach
  261. # TODO: SSE41 (which is only required for core mesa)
  262. # Check for GCC style atomics
  263. if cc.compiles('int main() { int n; return __atomic_load_n(&n, __ATOMIC_ACQUIRE); }',
  264. name : 'GCC atomic builtins')
  265. pre_args += '-DUSE_GCC_ATOMIC_BUILTINS'
  266. endif
  267. if not cc.links('''#include <stdint.h>
  268. uint64_t v;
  269. int main() {
  270. return __sync_add_and_fetch(&v, (uint64_t)1);
  271. }''',
  272. name : 'GCC 64bit atomics')
  273. pre_args += '-DMISSING_64_BIT_ATOMICS'
  274. endif
  275. # TODO: endian
  276. # TODO: powr8
  277. # TODO: shared/static? Is this even worth doing?
  278. # I don't think that I need to set any of the debug stuff, I think meson
  279. # handles that for us
  280. # TODO: ldflags
  281. # TODO: texture-float (gallium/mesa only)
  282. # TODO: cross-compiling. I don't think this is relavent to meson
  283. # FIXME: enable asm when cross compiler
  284. # This is doable (autotools does it), but it's not of immediate concern
  285. if meson.is_cross_build()
  286. message('Cross compiling, disabling asm')
  287. with_asm = false
  288. endif
  289. with_asm_arch = ''
  290. if with_asm
  291. # TODO: SPARC and PPC
  292. if host_machine.cpu_family() == 'x86'
  293. if ['linux', 'bsd'].contains(host_machine.system()) # FIXME: hurd?
  294. with_asm_arch = 'x86'
  295. pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
  296. '-DUSE_SSE_ASM']
  297. endif
  298. elif host_machine.cpu_family() == 'x86_64'
  299. if host_machine.system() == 'linux'
  300. with_asm_arch = 'x86_64'
  301. pre_args += ['-DUSE_X86_64_ASM']
  302. endif
  303. elif host_machine.cpu_family() == 'arm'
  304. if host_machine.system() == 'linux'
  305. with_asm_arch = 'arm'
  306. pre_args += ['-DUSE_ARM_ASM']
  307. endif
  308. elif host_machine.cpu_family() == 'aarch64'
  309. if host_machine.system() == 'linux'
  310. with_asm_arch = 'aarch64'
  311. pre_args += ['-DUSE_AARCH64_ASM']
  312. endif
  313. endif
  314. endif
  315. # Check for standard headers and functions
  316. if cc.has_header_symbol('sys/sysmacros.h', 'major')
  317. pre_args += '-DMAJOR_IN_SYSMACROS'
  318. elif cc.has_header_symbol('sys/mkdev.h', 'major')
  319. pre_args += '-DMAJOR_IN_MKDEV'
  320. endif
  321. foreach h : ['xlocale.h', 'sys/sysctl.h']
  322. if cc.has_header(h)
  323. pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
  324. endif
  325. endforeach
  326. foreach f : ['strtof', 'mkostemp', 'posix_memalign']
  327. if cc.has_function(f)
  328. pre_args += '-DHAVE_@0@'.format(f.to_upper())
  329. endif
  330. endforeach
  331. # strtod locale support
  332. if cc.links('''
  333. #define _GNU_SOURCE
  334. #include <stdlib.h>
  335. #include <locale.h>
  336. #ifdef HAVE_XLOCALE_H
  337. #include <xlocale.h>
  338. #endif
  339. int main() {
  340. locale_t loc = newlocale(LC_CTYPE_MASK, "C", NULL);
  341. const char *s = "1.0";
  342. char *end;
  343. double d = strtod_l(s, end, loc);
  344. float f = strtod_l(s, end, loc);
  345. freelocale(loc);
  346. return 0;
  347. }''',
  348. extra_args : pre_args,
  349. name : 'strtod has locale support')
  350. pre_args += '-DHAVE_STRTOD_L'
  351. endif
  352. # Check for some linker flags
  353. ld_args_bsymbolic = []
  354. if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic')
  355. ld_args_bsymbolic += '-Wl,-Bsymbolic'
  356. endif
  357. ld_args_gc_sections = []
  358. if cc.links('static char unused() { return 5; } int main() { return 0; }',
  359. args : '-Wl,--gc-sections')
  360. ld_args_gc_sections += '-Wl,--gc-sections'
  361. endif
  362. # check for dl support
  363. if cc.has_function('dlopen')
  364. dep_dl = []
  365. else
  366. dep_dl = cc.find_library('dl')
  367. endif
  368. if cc.has_function('dladdr', dependencies : dep_dl)
  369. # This is really only required for megadrivers
  370. pre_args += '-DHAVE_DLADDR'
  371. endif
  372. if cc.has_function('dl_iterate_phdr')
  373. pre_args += '-DHAVE_DL_ITERATE_PHDR'
  374. else
  375. # TODO: this is required for vulkan
  376. endif
  377. # Determine whether or not the rt library is needed for time functions
  378. if cc.has_function('clock_gettime')
  379. dep_clock = []
  380. else
  381. dep_clock = cc.find_library('rt')
  382. endif
  383. # TODO: some of these may be conditional
  384. dep_zlib = dependency('zlib', version : '>= 1.2.3')
  385. dep_thread = dependency('threads')
  386. pre_args += '-DHAVE_PTHREAD'
  387. dep_elf = dependency('libelf', required : false)
  388. if not dep_elf.found()
  389. dep_elf = cc.find_library('elf', required : with_amd_vk) # TODO: clover, r600, radeonsi
  390. endif
  391. dep_expat = dependency('expat')
  392. # this only exists on linux so either this is linux and it will be found, or
  393. # its not linux and and wont
  394. dep_m = cc.find_library('m', required : false)
  395. dep_libdrm_amdgpu = []
  396. if with_amd_vk
  397. dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.82')
  398. endif
  399. llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit']
  400. if with_amd_vk
  401. llvm_modules += ['amdgpu', 'bitreader', 'ipo']
  402. endif
  403. dep_llvm = dependency(
  404. 'llvm', version : '>= 3.9.0', required : false, modules : llvm_modules,
  405. )
  406. if not dep_llvm.found()
  407. if with_amd_vk
  408. error('Radv requires llvm.')
  409. endif
  410. else
  411. _llvm_version = dep_llvm.version().split('.')
  412. # Development versions of LLVM have an 'svn' suffix, we don't want that for
  413. # our version checks.
  414. _llvm_patch = _llvm_version[2]
  415. if _llvm_patch.endswith('svn')
  416. _llvm_patch = _llvm_patch.split('s')[0]
  417. endif
  418. pre_args += [
  419. '-DHAVE_LLVM=0x0@0@@1@@2@'.format(_llvm_version[0], _llvm_version[1], _llvm_patch),
  420. '-DMESA_LLVM_VERSION_PATCH=@0@'.format(_llvm_patch),
  421. ]
  422. endif
  423. dep_glvnd = []
  424. if with_glvnd
  425. dep_glvnd = dependency('libglvnd', version : '>= 0.2.0')
  426. pre_args += '-DUSE_LIBGLVND=1'
  427. endif
  428. # TODO: make this conditional
  429. dep_valgrind = dependency('valgrind', required : false)
  430. if dep_valgrind.found() and with_valgrind
  431. pre_args += '-DHAVE_VALGRIND'
  432. endif
  433. # pthread stubs. Lets not and say we didn't
  434. prog_bison = find_program('bison', required : with_any_opengl)
  435. prog_flex = find_program('flex', required : with_any_opengl)
  436. # TODO: selinux
  437. dep_selinux = []
  438. # TODO: llvm-prefix and llvm-shared-libs
  439. # TODO: unwind (llvm [radeon, gallivm] and gallium)
  440. # TODO: flags for opengl, gles, dri
  441. # TODO: gallium-hud
  442. # TODO: glx provider
  443. # TODO: osmesa provider
  444. # TODO: flags for xa, egl, gbm, nin, xvmc, vdpau, omx, va, opencl,
  445. # gallium-tests,
  446. # TODO: gallium drivers
  447. # TODO: symbol mangling
  448. # TODO: egl configuration
  449. if with_platform_wayland
  450. prog_wl_scanner = find_program('wayland-scanner')
  451. dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.8')
  452. dep_wayland_client = dependency('wayland-client', version : '>=1.11')
  453. dep_wayland_server = dependency('wayland-server', version : '>=1.11')
  454. else
  455. prog_wl_scanner = []
  456. dep_wl_protocols = []
  457. dep_wayland_client = []
  458. dep_wayland_server = []
  459. endif
  460. dep_xcb_dri2 = []
  461. dep_xcb_dri3 = []
  462. dep_dri2proto = []
  463. dep_glproto = []
  464. dep_x11 = []
  465. dep_xf86vm = []
  466. if with_platform_x11
  467. if with_glx == 'xlib'
  468. # TODO
  469. error('TODO')
  470. elif with_glx == 'gallium-xlib'
  471. # TODO
  472. error('TODO')
  473. else
  474. pre_args += '-DGLX_INDIRECT_RENDERING'
  475. if with_glx_direct
  476. pre_args += '-DGLX_DIRECT_RENDERING'
  477. endif
  478. if with_dri_platform == 'drm'
  479. pre_args += '-DGLX_USE_DRM'
  480. dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
  481. dep_x11 = [
  482. dependency('x11'),
  483. dependency('xext'),
  484. dependency('xdamage', version : '>= 1.1'),
  485. dependency('xfixes'),
  486. dependency('x11-xcb'),
  487. dependency('xcb'),
  488. dependency('xcb-glx', version : '>= 1.8.1'),
  489. ]
  490. dep_xf86vm = dependency('xf86vm', required : false)
  491. endif
  492. # TODO: XF86VIDMODE
  493. endif
  494. if with_glx != 'disabled'
  495. dep_glproto = dependency('glproto', version : '>= 1.4.14')
  496. endif
  497. if with_any_vk or (with_glx == 'dri' and with_dri_platform == 'drm')
  498. dep_xcb_dri2 = [
  499. dependency('x11-xcb'),
  500. dependency('xcb'),
  501. dependency('xcb-dri2', version : '>= 1.8'),
  502. dependency('xcb-xfixes'),
  503. ]
  504. pre_args += '-DHAVE_X11_PLATFORM'
  505. if with_dri3
  506. pre_args += '-DHAVE_DRI3'
  507. dep_xcb_dri3 = [
  508. dep_xcb_dri2,
  509. dependency('xcb-dri3'),
  510. dependency('xcb-present'),
  511. dependency('xcb-sync'),
  512. dependency('xshmfence', version : '>= 1.1'),
  513. ]
  514. endif
  515. endif
  516. endif
  517. # TODO: platforms for !vulkan
  518. # TODO: osmesa
  519. # TODO: egl
  520. # TODO: xa
  521. # TODO: vallium G3DVL
  522. # TODO: nine
  523. # TODO: clover
  524. # TODO: egl sans x11
  525. # TODO: xvmc
  526. # TODO: gallium tests
  527. # TODO: various libdirs
  528. # TODO: swr
  529. # TODO: gallium driver dirs
  530. # FIXME: this is a workaround for #2326
  531. prog_touch = find_program('touch')
  532. dummy_cpp = custom_target(
  533. 'dummy_cpp',
  534. output : 'dummy.cpp',
  535. command : [prog_touch, '@OUTPUT@'],
  536. )
  537. foreach a : pre_args
  538. add_project_arguments(a, language : ['c', 'cpp'])
  539. endforeach
  540. foreach a : c_args
  541. add_project_arguments(a, language : ['c'])
  542. endforeach
  543. foreach a : cpp_args
  544. add_project_arguments(a, language : ['cpp'])
  545. endforeach
  546. inc_include = include_directories('include')
  547. pkg = import('pkgconfig')
  548. subdir('include')
  549. subdir('src')