| Index: platform_tools/android/gyp/dependencies.gypi
|
| diff --git a/platform_tools/android/gyp/dependencies.gypi b/platform_tools/android/gyp/dependencies.gypi
|
| index 40dcf767c18faf23828ea9c6dd40cba4fe39b2f0..507a16345838edd5ae5c6ed171672b8299a9dd6f 100644
|
| --- a/platform_tools/android/gyp/dependencies.gypi
|
| +++ b/platform_tools/android/gyp/dependencies.gypi
|
| @@ -290,7 +290,39 @@
|
| '../app/jni/com_skia_SkiaSampleRenderer.cpp',
|
| ],
|
| },
|
| -
|
| + },
|
| + {
|
| + # This target is a dependency for VisualBench application which runs on
|
| + # Android. Since Android requires us to load native code in shared
|
| + # libraries, we need a common entry point to wrap around main(). Here
|
| + # we also change the type of all would-be executables to be shared
|
| + # libraries. The alternative would be to introduce a condition in every
|
| + # executable target which changes to a shared library if the target OS is
|
| + # Android. This is nicer because the switch is in one place.
|
| + 'target_name': 'Android_VisualBench',
|
| + 'type': 'static_library',
|
| + 'direct_dependent_settings': {
|
| + 'target_conditions': [
|
| + # '_type' is an 'automatic variable' which is defined for any
|
| + # target which defines a key-value pair with 'type' as the key (so,
|
| + # all of them). Conditionals inside 'target_conditions' are evaluated
|
| + # *after* all other definitions and conditionals are evaluated, so
|
| + # we're guaranteed that '_type' will be defined when we get here.
|
| + # For more info, see:
|
| + # - http://code.google.com/p/gyp/wiki/InputFormatReference#Variables
|
| + # - http://codereview.appspot.com/6353065/
|
| + ['_type == "executable"', {
|
| + 'type': 'shared_library',
|
| + }],
|
| + ],
|
| + 'include_dirs': [
|
| + '../../../tools/timer/',
|
| + ],
|
| + 'sources': [
|
| + '../visualbench/jni/SkOSWindow_AndroidNative.cpp',
|
| + '../visualbench/jni/main.cpp',
|
| + ],
|
| + },
|
| },
|
| ]
|
| }
|
|
|