Mesa (master): meson: wire up egl/android

Eric Engeström eric_engestrom at kemper.freedesktop.org
Mon Oct 30 16:32:35 UTC 2017


Module: Mesa
Branch: master
Commit: c5ec1556859b7d33637c9fad13d3473c7b2f9eb3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5ec1556859b7d33637c9fad13d3473c7b2f9eb3

Author: Eric Engestrom <eric.engestrom at imgtec.com>
Date:   Tue Oct 24 16:08:15 2017 +0100

meson: wire up egl/android

Cc: Rob Herring <robh at kernel.org>
Cc: Tomasz Figa <tfiga at chromium.org>
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

---

 meson.build         | 15 ++++++++++++---
 src/egl/meson.build |  5 ++++-
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 8988deae78..24d997b3e0 100644
--- a/meson.build
+++ b/meson.build
@@ -150,7 +150,7 @@ endif
 # TODO: other OSes
 with_dri_platform = 'drm'
 
-# TODO: android platform
+with_platform_android = false
 with_platform_wayland = false
 with_platform_x11 = false
 with_platform_drm = false
@@ -159,6 +159,7 @@ egl_native_platform = ''
 _platforms = get_option('platforms')
 if _platforms != ''
   _split = _platforms.split(',')
+  with_platform_android = _split.contains('android')
   with_platform_x11 = _split.contains('x11')
   with_platform_wayland = _split.contains('wayland')
   with_platform_drm = _split.contains('drm')
@@ -250,8 +251,8 @@ if _vulkan_drivers != ''
   with_intel_vk = _split.contains('intel')
   with_amd_vk = _split.contains('amd')
   with_any_vk = with_amd_vk or with_intel_vk
-  if not (with_platform_x11 or with_platform_wayland)
-    error('Vulkan requires at least one platform (x11, wayland)')
+  if not (with_platform_x11 or with_platform_wayland or with_platform_android)
+    error('Vulkan requires at least one platform (x11, wayland, android)')
   endif
 endif
 
@@ -328,6 +329,14 @@ endif
 if with_platform_surfaceless
   pre_args += '-DHAVE_SURFACELESS_PLATFORM'
 endif
+if with_platform_android
+  dep_android = [
+    dependency('cutils'),
+    dependency('hardware'),
+    dependency('sync'),
+  ]
+  pre_args += '-DHAVE_ANDROID_PLATFORM'
+endif
 
 prog_python2 = find_program('python2')
 has_mako = run_command(prog_python2, '-c', 'import mako')
diff --git a/src/egl/meson.build b/src/egl/meson.build
index ea7ae06761..cc51671f9d 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -129,7 +129,10 @@ if with_platform_wayland
     'wayland/wayland-egl', 'wayland/wayland-drm',
   )
 endif
-# TODO: android
+if with_platform_android
+  deps_for_egl += dep_android
+  files_egl += files('drivers/dri2/platform_android.c')
+endif
 
 # TODO: glvnd
 




More information about the mesa-commit mailing list