From d4b4a4a864ae3b7058f6665dcdb83a4bb3098082 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 27 Apr 2019 13:00:52 +0300 Subject: [PATCH] waflib: xcompile: add support for ANDROID_NDK environment variable, as well as ANDROID_NDK_HOME. Fix help message. --- scripts/waflib/xcompile.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/waflib/xcompile.py b/scripts/waflib/xcompile.py index b83cc314..2848c476 100644 --- a/scripts/waflib/xcompile.py +++ b/scripts/waflib/xcompile.py @@ -112,13 +112,17 @@ class Android: def options(opt): android = opt.add_option_group('Android options') android.add_option('--android', action='store', dest='ANDROID_OPTS', default=None, - help='enable building for android, format: --android=,,, example: --android=arm,4.9,26') + help='enable building for android, format: --android=,,, example: --android=armeabi-v7a-hard,4.9,9') def configure(conf): if conf.options.ANDROID_OPTS: - android_ndk_path = os.getenv('ANDROID_NDK_HOME') + for i in ['ANDROID_NDK_HOME', 'ANDROID_NDK']: + android_ndk_path = os.getenv(i) + if android_ndk_path != None: + break + if not android_ndk_path: - conf.fatal('Set ANDROID_NDK_HOME environment variable pointing to the root of Android NDK!') + conf.fatal('Set ANDROID_NDK_HOME environment variable pointing to the root of Android NDK!') values = conf.options.ANDROID_OPTS.split(',') if len(values) != 3: