OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 config("gles2_config") { | 5 config("gles2_config") { |
6 defines = [ "GLES2_USE_MOJO" ] | 6 defines = [ "GLES2_USE_MOJO" ] |
7 } | 7 } |
8 | 8 |
9 # GYP version: mojo/mojo_public.gypi:mojo_gles2 | 9 # GYP version: mojo/mojo_public.gypi:mojo_gles2 |
10 static_library("gles2") { | 10 static_library("gles2") { |
(...skipping 23 matching lines...) Expand all Loading... |
34 "../platform/native/gles2_impl_chromium_sync_point_thunks.h", | 34 "../platform/native/gles2_impl_chromium_sync_point_thunks.h", |
35 "gles2_interface.h", | 35 "gles2_interface.h", |
36 ] | 36 ] |
37 | 37 |
38 if (is_mac) { | 38 if (is_mac) { |
39 # TODO(GYP): Make it a run-path dependent library. | 39 # TODO(GYP): Make it a run-path dependent library. |
40 # 'DYLIB_INSTALL_NAME_BASE': '@loader_path', | 40 # 'DYLIB_INSTALL_NAME_BASE': '@loader_path', |
41 } | 41 } |
42 } | 42 } |
43 | 43 |
| 44 |
| 45 # In an is_component_build build, everything can link against //mojo/gles2 |
| 46 # because it is built as a shared library. However, in a static build, |
| 47 # //mojo/gles2 is linked into an executable (e.g., mojo_shell), and must be |
| 48 # injected into other shared libraries (i.e., Mojo Apps) that need the mojo |
| 49 # gles2 API. |
| 50 # |
| 51 # For component targets, add //mojo/public/gles2:for_component to your deps |
| 52 # section. |
| 53 # |
| 54 # For shared_library targets (e.g., a Mojo App), add |
| 55 # //mojo/public/gles2:for_shared_library to your deps |
| 56 |
| 57 group("for_shared_library") { |
| 58 if (is_component_build) { |
| 59 deps = [ "//mojo/gles2" ] |
| 60 } else { |
| 61 deps = [ ":gles2" ] |
| 62 } |
| 63 } |
| 64 |
| 65 group("for_component") { |
| 66 if (is_component_build) { |
| 67 deps = [ "//mojo/gles2" ] |
| 68 } |
| 69 } |
OLD | NEW |