Commit e92ecf84 authored by navabi@google.com's avatar navabi@google.com

Set ANDROID_SDK_ROOT to point to checked in sdk.


BUG=


Review URL: https://chromiumcodereview.appspot.com/10829091

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149258 0039d316-1c4b-4281-b951-d872f2087c98
parent d89125b5
...@@ -146,14 +146,16 @@ common_gyp_vars() { ...@@ -146,14 +146,16 @@ common_gyp_vars() {
################################################################################ ################################################################################
# Initializes environment variables for NDK/SDK build. Only Android NDK Revision # Initializes environment variables for NDK/SDK build. Only Android NDK Revision
# 7 on Linux or Mac is offically supported. To run this script, the system # 7 on Linux or Mac is offically supported. To run this script, the system
# environment ANDROID_NDK_ROOT must be set to Android NDK's root path as well as # environment ANDROID_NDK_ROOT must be set to Android NDK's root path. The
# ANDROID_SDK_ROOT to the SDK root. # ANDROID_SDK_ROOT only needs to be set to override the default SDK which is in
# the tree under $ROOT/src/third_party/android_tools/sdk.
# TODO(navabi): Add NDK to $ROOT/src/third_party/android_tools/ndk.
# To build Chromium for Android with NDK/SDK follow the steps below: # To build Chromium for Android with NDK/SDK follow the steps below:
# > export ANDROID_NDK_ROOT=<android ndk root> # > export ANDROID_NDK_ROOT=<android ndk root>
# > export ANDROID_SDK_ROOT=<android sdk root> # > export ANDROID_SDK_ROOT=<android sdk root> # to override the default sdk
# > . build/android/envsetup.sh --sdk # > . build/android/envsetup.sh --sdk
# > make # > make
############################################################################# ################################################################################
sdk_build_init() { sdk_build_init() {
if [ ! -d "${ANDROID_NDK_ROOT}" ]; then if [ ! -d "${ANDROID_NDK_ROOT}" ]; then
echo "ANDROID_NDK_ROOT must be set to the path of Android NDK." >& 2 echo "ANDROID_NDK_ROOT must be set to the path of Android NDK." >& 2
...@@ -162,11 +164,10 @@ sdk_build_init() { ...@@ -162,11 +164,10 @@ sdk_build_init() {
return 1 return 1
fi fi
# If ANDROID_SDK_ROOT is set when envsetup is run, use the sdk pointed to by
# the environment variable. Otherwise, use the default sdk from the tree.
if [ ! -d "${ANDROID_SDK_ROOT}" ]; then if [ ! -d "${ANDROID_SDK_ROOT}" ]; then
echo "ANDROID_SDK_ROOT must be set to the path of Android SDK." >& 2 export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/"
echo "which could be installed by" >& 2
echo "<chromium_tree>/src/build/install-build-deps-android-sdk.sh" >& 2
return 1
fi fi
# Makes sure ANDROID_BUILD_TOP is unset if build has option --sdk # Makes sure ANDROID_BUILD_TOP is unset if build has option --sdk
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment