meson: bump required glvnd version
[mesa.git] / meson.build
index 011b1eca83215b2e7f69e986f20c178f5c6e8d3d..c76748b7162890ecbee54a1bec36935fde9caaf4 100644 (file)
@@ -389,7 +389,7 @@ elif _xlib_lease == 'false'
   warning('xlib_lease option "false" deprecated, please use "disabled" instead.')
 endif
 if _xlib_lease == 'auto'
-  with_xlib_lease = with_platform_x11 and with_gbm
+  with_xlib_lease = with_platform_x11 and system_has_kms_drm
 else
   with_xlib_lease = _xlib_lease == 'enabled'
 endif
@@ -836,19 +836,29 @@ endif
 if with_gbm
   pre_args += '-DHAVE_DRM_PLATFORM'
 endif
+
+with_android_stub = get_option('android-stub')
+if with_android_stub and not with_platform_android
+  error('`-D android-stub=true` makes no sense without `-D platforms=android`')
+endif
+
 if with_platform_android
-  dep_android = [
-    dependency('cutils'),
-    dependency('hardware'),
-    dependency('sync'),
-  ]
-  if with_gallium
-    dep_android += dependency('backtrace')
-  endif
-  if get_option('platform-sdk-version') >= 26
-    dep_android += dependency('nativewindow')
+  if not with_android_stub
+    dep_android = [
+      dependency('cutils'),
+      dependency('hardware'),
+      dependency('sync'),
+      dependency('backtrace')
+    ]
+    if get_option('platform-sdk-version') >= 26
+      dep_android += dependency('nativewindow')
+    endif
   endif
-  pre_args += '-DHAVE_ANDROID_PLATFORM'
+  pre_args += [
+    '-DHAVE_ANDROID_PLATFORM',
+    '-DANDROID',
+    '-DANDROID_API_LEVEL=' + get_option('platform-sdk-version').to_string()
+  ]
 endif
 if with_platform_haiku
   pre_args += '-DHAVE_HAIKU_PLATFORM'
@@ -1543,7 +1553,7 @@ endif
 
 dep_glvnd = null_dep
 if with_glvnd
-  dep_glvnd = dependency('libglvnd', version : '>= 1.2.0')
+  dep_glvnd = dependency('libglvnd', version : '>= 1.3.2')
   pre_args += '-DUSE_LIBGLVND=1'
 endif