OLD | NEW |
1 # Copyright 2015 Google Inc. | 1 # Copyright 2015 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # This GYP file stores the dependencies necessary to build Skia on the Android | 6 # This GYP file stores the dependencies necessary to build Skia on the Android |
7 # platform. The OS doesn't provide many stable libraries as part of the | 7 # platform. The OS doesn't provide many stable libraries as part of the |
8 # distribution so we have to build a few of them ourselves. | 8 # distribution so we have to build a few of them ourselves. |
9 # | 9 # |
10 # NOTE: We tried adding the gyp file to the android/ directory at the root of | 10 # NOTE: We tried adding the gyp file to the android/ directory at the root of |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 }], | 114 }], |
115 ], | 115 ], |
116 'cflags': [ | 116 'cflags': [ |
117 '-Wno-unused-private-field', | 117 '-Wno-unused-private-field', |
118 ], | 118 ], |
119 'sources': [ | 119 'sources': [ |
120 '../apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp', | 120 '../apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp', |
121 ], | 121 ], |
122 }, | 122 }, |
123 }, | 123 }, |
124 { | |
125 # This target is a dependency for VisualBench application which runs on | |
126 # Android. Since Android requires us to load native code in shared | |
127 # libraries, we need a common entry point to wrap around main(). Here | |
128 # we also change the type of all would-be executables to be shared | |
129 # libraries. The alternative would be to introduce a condition in every | |
130 # executable target which changes to a shared library if the target OS is | |
131 # Android. This is nicer because the switch is in one place. | |
132 'target_name': 'Android_VisualBench', | |
133 'type': 'static_library', | |
134 'direct_dependent_settings': { | |
135 'target_conditions': [ | |
136 # '_type' is an 'automatic variable' which is defined for any | |
137 # target which defines a key-value pair with 'type' as the key (so, | |
138 # all of them). Conditionals inside 'target_conditions' are evaluated | |
139 # *after* all other definitions and conditionals are evaluated, so | |
140 # we're guaranteed that '_type' will be defined when we get here. | |
141 # For more info, see: | |
142 # - http://code.google.com/p/gyp/wiki/InputFormatReference#Variables | |
143 # - http://codereview.appspot.com/6353065/ | |
144 ['_type == "executable"', { | |
145 'type': 'shared_library', | |
146 }], | |
147 ], | |
148 'include_dirs': [ | |
149 '../../../tools/timer/', | |
150 '../../../tools/VisualBench/', | |
151 ], | |
152 'sources': [ | |
153 '../apps/visualbench/src/main/jni/SkOSWindow_AndroidNative.cpp', | |
154 '../apps/visualbench/src/main/jni/main.cpp', | |
155 ], | |
156 }, | |
157 }, | |
158 ] | 124 ] |
159 } | 125 } |
OLD | NEW |