0001-meson-Use-a-partial-dependency-to-pass-EGL-module-fl.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 81bfedfa02fd864f3e4b295091d49c3eb20bb372 Mon Sep 17 00:00:00 2001
  2. From: Adrian Perez de Castro <aperez@igalia.com>
  3. Date: Wed, 16 Sep 2020 00:01:37 +0300
  4. Subject: [PATCH] meson: Use a partial dependency to pass EGL module flags
  5. Make Meson try to always find an "egl" dependency, if found extract
  6. the include directories and compiler flags from ir using a partial
  7. dependency, otherwise check that at least EGL/eglplatform.h is
  8. available when the pkg-config module is not found.
  9. Fixes #70
  10. Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
  11. [Upstrem status: https://github.com/WebPlatformForEmbedded/libwpe/pull/71]
  12. ---
  13. meson.build | 12 ++++++++++--
  14. 1 file changed, 10 insertions(+), 2 deletions(-)
  15. diff --git a/meson.build b/meson.build
  16. index 5c88aed..a05f4ab 100644
  17. --- a/meson.build
  18. +++ b/meson.build
  19. @@ -57,8 +57,16 @@ dependencies = [
  20. ]
  21. cc = meson.get_compiler('c')
  22. -if not cc.has_header('EGL/eglplatform.h')
  23. - dependencies += dependency('egl')
  24. +egl_dep = dependency('egl', required: false)
  25. +if egl_dep.found()
  26. + dependencies += egl_dep.partial_dependency(
  27. + compile_args: true,
  28. + includes: true,
  29. + )
  30. +else
  31. + assert(cc.has_header('EGL/eglplatform.h'),
  32. + 'Required heaer <EGL/eglplatform.h> not found'
  33. + )
  34. endif
  35. if not cc.has_function('dlopen')
  36. --
  37. 2.28.0