summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorKristian H. Kristensen <hoegsberg@google.com>2020-07-29 01:09:23 -0700
committerMarge Bot <eric+marge@anholt.net>2020-08-05 18:08:07 +0000
commit5096ebf9549513436ffd7df7ef7ee1c3ee8cbf7e (patch)
tree8155144eb0b74c7621d1aa54b6b6a08f3ad37b4c /meson.build
parente05e60b2301d3859597cc82b0caecf1a61fd94dd (diff)
meson: Define ANDROID and ANDROID_API_LEVEL when compiling for Android
Set ANDROID_API_LEVEL based on the value we already have and define ANDROID to make sure we build code paths that are guarded by that. Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index a019e4d8d41..39c49775c44 100644
--- a/meson.build
+++ b/meson.build
@@ -854,7 +854,11 @@ if with_platform_android
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'