From 6291d4d33978f14e59e64a4b66ef92ee891babc3 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 25 Jan 2023 18:44:33 +0000 Subject: meson: turn android-libbacktrace into a feature option Signed-off-by: Eric Engestrom Reviewed-by: Dylan Baker Part-of: --- meson.build | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 4ecdd523ed5..acabbcdfc88 100644 --- a/meson.build +++ b/meson.build @@ -818,14 +818,10 @@ if with_android_stub and not with_platform_android error('`-D android-stub=true` makes no sense without `-D platforms=android`') endif -if get_option('android-libbacktrace') == 'auto' - with_libbacktrace = with_platform_android -else - with_libbacktrace = get_option('android-libbacktrace') == 'true' - if with_libbacktrace and not with_platform_android - error('`-D android-libbacktrace=true` makes no sense without `-D platforms=android`') - endif -endif +with_libbacktrace = get_option('android-libbacktrace') \ + .require(with_platform_android, error_message : '`-D android-libbacktrace=enabled` makes no sense without `-D platforms=android`') \ + .disable_auto_if(not with_platform_android) \ + .allowed() if with_libbacktrace cpp_args += '-DWITH_LIBBACKTRACE' -- cgit v1.2.1