Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: platform_tools/android/gyp/dependencies.gypi

Issue 2099693002: Revert of Remove Android SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « platform_tools/android/apps/settings.gradle ('k') | platform_tools/android/gyp/skia_android.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/gyp/dependencies.gypi
diff --git a/platform_tools/android/gyp/dependencies.gypi b/platform_tools/android/gyp/dependencies.gypi
index 55f9576f8a34e505168e297d304bc7800aa775e2..14f73bf1abae6c7e59f608969eb14f4301850cd9 100644
--- a/platform_tools/android/gyp/dependencies.gypi
+++ b/platform_tools/android/gyp/dependencies.gypi
@@ -89,5 +89,37 @@
],
},
},
+ {
+ # This target is a dependency for Skia Sample 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_SampleApp',
+ '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',
+ }],
+ ],
+ 'cflags': [
+ '-Wno-unused-private-field',
+ ],
+ 'sources': [
+ '../apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp',
+ ],
+ },
+ },
]
}
« no previous file with comments | « platform_tools/android/apps/settings.gradle ('k') | platform_tools/android/gyp/skia_android.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698