Chromium Code Reviews| Index: platform_tools/android/gyp/skia_android.gypi |
| diff --git a/platform_tools/android/gyp/skia_android.gypi b/platform_tools/android/gyp/skia_android.gypi |
| index ace21ccae7a03e9492b4076601bebd72fb9dac5d..17514ec9bcf1a5b07d84186d4546294e7ea95df9 100644 |
| --- a/platform_tools/android/gyp/skia_android.gypi |
| +++ b/platform_tools/android/gyp/skia_android.gypi |
| @@ -1,5 +1,30 @@ |
| # |
| { |
| + 'variables': { |
| + 'conditions': [ |
| + [ 'skia_arch_type == "arm" and arm_version != 7', { |
| + 'android_arch%': "armeabi", |
| + }], |
| + [ 'skia_arch_type == "arm" and arm_version == 7', { |
| + 'android_arch%': "armeabi-v7a", |
| + }], |
| + [ 'skia_arch_type == "arm64"', { |
| + 'android_arch%': "arm64-v8a", |
| + }], |
| + [ 'skia_arch_type == "x86"', { |
| + 'android_arch%': "x86", |
| + }], |
| + [ 'skia_arch_type == "x86_64"', { |
| + 'android_arch%': "x86_64", |
| + }], |
| + [ 'skia_arch_type == "mips" and skia_arch_width == 32', { |
| + 'android_arch%': "mips", |
| + }], |
| + [ 'skia_arch_type == "mips" and skia_arch_width == 64', { |
| + 'android_arch%': "mips64", |
| + }], |
| + ], |
| + }, |
| 'targets': [ |
| { |
| 'target_name': 'CopySampleAppDeps', |
| @@ -8,39 +33,14 @@ |
| 'skia_lib.gyp:skia_lib', |
| 'SampleApp.gyp:SampleApp', |
| ], |
| - 'variables': { |
| - 'conditions': [ |
| - [ 'skia_arch_type == "arm" and arm_version != 7', { |
| - 'android_arch%': "armeabi", |
| - }], |
| - [ 'skia_arch_type == "arm" and arm_version == 7', { |
| - 'android_arch%': "armeabi-v7a", |
| - }], |
| - [ 'skia_arch_type == "arm64"', { |
| - 'android_arch%': "arm64-v8a", |
| - }], |
| - [ 'skia_arch_type == "x86"', { |
| - 'android_arch%': "x86", |
| - }], |
| - [ 'skia_arch_type == "x86_64"', { |
| - 'android_arch%': "x86_64", |
| - }], |
| - [ 'skia_arch_type == "mips" and skia_arch_width == 32', { |
| - 'android_arch%': "mips", |
| - }], |
| - [ 'skia_arch_type == "mips" and skia_arch_width == 64', { |
| - 'android_arch%': "mips64", |
| - }], |
| - ], |
| - }, |
| 'copies': [ |
| # Copy all shared libraries into the Android app's libs folder. Note |
| - # that this copy requires us to build SkiaAndroidApp after those |
| + # that this copy requires us to build VisualbenchApp after those |
|
djsollen
2015/06/11 20:32:00
I don't think you meant to update this comment.
joshualitt
2015/06/12 15:40:35
Acknowledged.
|
| # libraries, so that they exist by the time it occurs. If there are no |
| # libraries to copy, this will cause an error in Make, but the app will |
| # still build. |
| { |
| - 'destination': '<(PRODUCT_DIR)/android/libs/<(android_arch)', |
| + 'destination': '<(PRODUCT_DIR)/android/SampleApp/libs/<(android_arch)', |
| 'conditions': [ |
| [ 'skia_shared_lib', { |
| 'files': [ |
| @@ -66,7 +66,7 @@ |
| # the ninja generator treats PRODUCT_DIR as a relative path to the |
| # gyp directory but android ant build wants a path relative to the |
| # build.xml file so we do that adjustment here. |
| - 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android' |
| + 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android/SampleApp' |
| }, |
| 'actions': [ |
| { |
| @@ -82,7 +82,7 @@ |
| '<(android_base)/app/src/com/skia/SkiaSampleView.java', |
| ], |
| 'outputs': [ |
| - '<(PRODUCT_DIR)/../android/bin/SkiaAndroid.apk', |
| + '<(PRODUCT_DIR)/../android/SampleApp/bin/SkiaAndroid.apk', |
| ], |
| 'action': [ |
| 'ant', |
| @@ -99,5 +99,75 @@ |
| }, |
| ], |
| }, |
| + { |
| + 'target_name': 'CopyVisualBenchDeps', |
| + 'type': 'none', |
| + 'dependencies': [ |
| + 'skia_lib.gyp:skia_lib', |
| + 'visualbench.gyp:visualbench', |
| + ], |
| + |
| + 'copies': [ |
| + # Copy all shared libraries into the Android app's libs folder. Note |
| + # that this copy requires us to build SkiaAndroidApp after those |
| + # libraries, so that they exist by the time it occurs. If there are no |
| + # libraries to copy, this will cause an error in Make, but the app will |
| + # still build. |
| + { |
| + 'destination': '<(PRODUCT_DIR)/android/VisualBench/libs/<(android_arch)', |
| + 'conditions': [ |
| + [ 'skia_shared_lib', { |
| + 'files': [ |
| + '<(SHARED_LIB_DIR)/libskia_android.so', |
| + '<(SHARED_LIB_DIR)/libvisualbench.so', |
| + ]}, { |
| + 'files': [ |
| + '<(SHARED_LIB_DIR)/libvisualbench.so', |
| + ]} |
| + ], |
| + ], |
| + }, |
| + ], |
| + }, |
| + { |
| + 'target_name': 'VisualBench_APK', |
| + 'type': 'none', |
| + 'dependencies': [ |
| + 'CopyVisualBenchDeps', |
| + ], |
| + 'variables': { |
| + 'ANDROID_SDK_ROOT': '<!(echo $ANDROID_SDK_ROOT)', |
| + # the ninja generator treats PRODUCT_DIR as a relative path to the |
| + # gyp directory but android ant build wants a path relative to the |
| + # build.xml file so we do that adjustment here. |
| + 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android/VisualBench/' |
| + }, |
| + 'actions': [ |
| + { |
| + 'action_name': 'SkiaVisualBench_apk', |
| + 'inputs': [ |
| + '<(android_base)/visualbench/AndroidManifest.xml', |
| + '<(android_base)/visualbench/build.xml', |
| + '<(android_base)/visualbench/project.properties', |
| + '<(android_base)/visualbench/src/com/skia/VisualBenchActivity.java', |
| + ], |
| + 'outputs': [ |
| + '<(PRODUCT_DIR)/../android/VisualBench/bin/VisualBench.apk', |
|
djsollen
2015/06/11 20:32:00
update this to <(ANDROID_OUT)/bin/VisualBench.apk
joshualitt
2015/06/12 15:40:35
Hmm, for some reason gyp really doesn't like this
djsollen
2015/06/12 16:27:14
No idea why that is so feel free to leave as is.
|
| + ], |
| + 'action': [ |
| + 'ant', |
| + '-quiet', |
| + '-f', |
| + '<(android_base)/visualbench/build.xml', |
| + '-Dout.dir=<(ANDROID_OUT)/bin', |
| + '-Dgen.absolute.dir=<(ANDROID_OUT)/gen', |
| + '-Dnative.libs.absolute.dir=<(ANDROID_OUT)/libs', |
| + '-Dout.final.file=<(ANDROID_OUT)/bin/VisualBench.apk', |
| + '-Dsdk.dir=<(ANDROID_SDK_ROOT)', |
| + 'debug', |
| + ], |
| + }, |
| + ], |
| + }, |
| ], |
| } |