From 6e105ede383985ca442d91ae9c5488802e879d8e Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Tue, 15 Apr 2014 08:35:00 +0000 Subject: [PATCH] Make WebRTC Android examples build without sourcing envsetup.sh The new recipes framework for configuring build explicitly sets the GYP_DEFINES for Android builds instead of relying on the envsetup.sh script which probably will be removed at some point in the future. This causes our build to break since our Android examples relies on the Android SDK being found using the ANDROID_SDK_ROOT environment variable. A GYP variable 'android_sdk_root' exists and is set correctly by common.gypi, which is what I'm using to pass this path correctly to these tests. The libjingle example is handled separately in https://webrtc-codereview.appspot.com/11809004/ BUG=chromium:346198 TEST=Local builds using: . build/android/envsetup.sh unset ANDROID_SDK_ROOT webrtc/build/gyp_webrtc ninja -C out/Debug ninja -C out/Release + trybots passing: git try --bot=android,android_rel,android_clang R=henrike@webrtc.org Review URL: https://webrtc-codereview.appspot.com/11799004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5907 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/webrtc_examples.gyp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webrtc/webrtc_examples.gyp b/webrtc/webrtc_examples.gyp index fff40da945..e880c11d39 100644 --- a/webrtc/webrtc_examples.gyp +++ b/webrtc/webrtc_examples.gyp @@ -74,7 +74,8 @@ 'cp <(PRODUCT_DIR)/lib.java/video_render_module_java.jar <(android_webrtc_demo_root)/libs/ &&' '<(android_strip) -o <(android_webrtc_demo_root)/libs/<(android_app_abi)/libwebrtcdemo-jni.so <(PRODUCT_DIR)/libwebrtcdemo-jni.so && ' 'cd <(android_webrtc_demo_root) && ' - '{ ant debug > <(ant_log) 2>&1 || ' + '{ ANDROID_SDK_ROOT=<(android_sdk_root) ' + 'ant debug > <(ant_log) 2>&1 || ' ' { cat <(ant_log) ; exit 1; } } && ' 'cd - > /dev/null && ' 'cp <(android_webrtc_demo_root)/bin/WebRTCDemo-debug.apk <(_outputs)' @@ -135,7 +136,8 @@ '<(android_strip) -o <(android_opensl_demo_root)/libs/<(android_app_abi)/libopensl-demo-jni.so <(PRODUCT_DIR)/libopensl-demo-jni.so && ' 'cp <(PRODUCT_DIR)/lib.java/audio_device_module_java.jar <(android_opensl_demo_root)/libs/ &&' 'cd <(android_opensl_demo_root) && ' - '{ ant debug > <(ant_log) 2>&1 || ' + '{ ANDROID_SDK_ROOT=<(android_sdk_root) ' + 'ant debug > <(ant_log) 2>&1 || ' ' { cat <(ant_log) ; exit 1; } } && ' 'cd - > /dev/null && ' 'cp <(android_opensl_demo_root)/bin/OpenSlDemo-debug.apk <(_outputs)'