meson.build 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. wayland_egl = library(
  2. 'wayland-egl',
  3. sources: [
  4. 'wayland-egl.c',
  5. wayland_client_protocol_h
  6. ],
  7. include_directories: src_inc,
  8. version: meson.project_version(),
  9. install: true
  10. )
  11. if get_option('tests')
  12. wayland_egl_abi_check = executable('wayland-egl-abi-check', 'wayland-egl-abi-check.c')
  13. test('wayland-egl abi check', wayland_egl_abi_check)
  14. if get_option('default_library') != 'static'
  15. nm_path = find_program(['llvm-nm', 'nm']).full_path()
  16. wayland_egl_shared = wayland_egl
  17. if get_option('default_library') == 'both'
  18. wayland_egl_shared = wayland_egl.get_shared_lib()
  19. endif
  20. test(
  21. 'wayland-egl symbols check',
  22. find_program('wayland-egl-symbols-check'),
  23. depends: wayland_egl,
  24. env: [
  25. 'WAYLAND_EGL_LIB=@0@'.format(wayland_egl_shared.full_path()),
  26. 'NM=@0@'.format(nm_path)
  27. ]
  28. )
  29. endif
  30. endif
  31. install_headers([
  32. 'wayland-egl.h',
  33. 'wayland-egl-core.h',
  34. 'wayland-egl-backend.h'
  35. ])
  36. pkgconfig.generate(
  37. name: 'wayland-egl',
  38. description: 'Frontend wayland-egl library',
  39. version: '18.1.0',
  40. requires: 'wayland-client',
  41. libraries: wayland_egl
  42. )
  43. pkgconfig.generate(
  44. name: 'wayland-egl-backend',
  45. description: 'Backend wayland-egl interface',
  46. version: '3'
  47. )
  48. wayland_egl_dep = declare_dependency(
  49. link_with: wayland_egl,
  50. include_directories: [ root_inc, include_directories('.') ],
  51. )
  52. meson.override_dependency('wayland-egl', wayland_egl_dep)