diff options
author | joshualitt <joshualitt@chromium.org> | 2015-11-10 07:36:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-10 07:36:18 -0800 |
commit | 01f4a9e7bf106fb7cc5b7e08a5154aefb326b0c7 (patch) | |
tree | d83af1bbe613a2320a0259d18a908d8b915d33fc /platform_tools | |
parent | 07d56b13927a4cb8dc4db16c8a573dee120937f1 (diff) |
Fixes for building with sdl on android
BUG=skia:
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/1437613002
Diffstat (limited to 'platform_tools')
-rw-r--r-- | platform_tools/android/gyp/dependencies.gypi | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/platform_tools/android/gyp/dependencies.gypi b/platform_tools/android/gyp/dependencies.gypi index 3be8542e11..eb34f10cd7 100644 --- a/platform_tools/android/gyp/dependencies.gypi +++ b/platform_tools/android/gyp/dependencies.gypi @@ -177,5 +177,31 @@ ], }, }, + { + # 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_VisualBenchSDL', + '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', + }], + ], + }, + }, ] } |