OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 # See comments in third_party/mojo/src/mojo/public/c/system/BUILD.gn which this | 5 # See comments in mojo/public/c/system/BUILD.gn which this is based on. |
6 # is based on. | |
7 # Summary: depend on this target to use the platform handle functions without | 6 # Summary: depend on this target to use the platform handle functions without |
8 # linking against a specific implementation. | 7 # linking against a specific implementation. |
9 # For component targets, add //mojo/platform_handle:for_component to your deps | 8 # For component targets, add //mojo/platform_handle:for_component to your deps |
10 # section. | 9 # section. |
11 # For shared_library targets (e.g., a Mojo App), add | 10 # For shared_library targets (e.g., a Mojo App), add |
12 # //mojo/platform_handle:for_shared_library to your deps. | 11 # //mojo/platform_handle:for_shared_library to your deps. |
13 source_set("platform_handle") { | 12 source_set("platform_handle") { |
14 sources = [ | 13 sources = [ |
15 "platform_handle.h", | 14 "platform_handle.h", |
16 "platform_handle_functions.h", | 15 "platform_handle_functions.h", |
17 ] | 16 ] |
18 deps = [ | 17 deps = [ |
19 "//third_party/mojo/src/mojo/public/c/system", | 18 "//mojo/public/c/system", |
20 ] | 19 ] |
21 } | 20 } |
22 | 21 |
23 component("platform_handle_impl") { | 22 component("platform_handle_impl") { |
24 output_name = "platform_handle_impl" | 23 output_name = "platform_handle_impl" |
25 public_deps = [ | 24 public_deps = [ |
26 ":platform_handle", | 25 ":platform_handle", |
27 ] | 26 ] |
28 sources = [ | 27 sources = [ |
29 "platform_handle_functions.cc", | 28 "platform_handle_functions.cc", |
30 ] | 29 ] |
31 defines = [ "PLATFORM_HANDLE_IMPLEMENTATION" ] | 30 defines = [ "PLATFORM_HANDLE_IMPLEMENTATION" ] |
32 deps = [ | 31 deps = [ |
33 "//base", | 32 "//base", |
| 33 "//mojo/public/c/system:for_component", |
34 "//third_party/mojo/src/mojo/edk/embedder:headers", | 34 "//third_party/mojo/src/mojo/edk/embedder:headers", |
35 "//third_party/mojo/src/mojo/public/c/system:for_component", | |
36 ] | 35 ] |
37 } | 36 } |
38 | 37 |
39 source_set("platform_handle_thunks") { | 38 source_set("platform_handle_thunks") { |
40 public_deps = [ | 39 public_deps = [ |
41 ":platform_handle", | 40 ":platform_handle", |
42 ] | 41 ] |
43 sources = [ | 42 sources = [ |
44 "platform_handle_private_thunks.cc", | 43 "platform_handle_private_thunks.cc", |
45 "platform_handle_private_thunks.h", | 44 "platform_handle_private_thunks.h", |
46 ] | 45 ] |
47 defines = [ "PLATFORM_HANDLE_IMPLEMENTATION" ] | 46 defines = [ "PLATFORM_HANDLE_IMPLEMENTATION" ] |
48 deps = [ | 47 deps = [ |
49 "//third_party/mojo/src/mojo/public/c/system", | 48 "//mojo/public/c/system", |
50 ] | 49 ] |
51 } | 50 } |
52 | 51 |
53 group("for_shared_library") { | 52 group("for_shared_library") { |
54 public_deps = [ | 53 public_deps = [ |
55 ":platform_handle", | 54 ":platform_handle", |
56 ] | 55 ] |
57 if (is_component_build) { | 56 if (is_component_build) { |
58 deps = [ | 57 deps = [ |
59 ":platform_handle_impl", | 58 ":platform_handle_impl", |
60 ] | 59 ] |
61 } else { | 60 } else { |
62 deps = [ | 61 deps = [ |
63 ":platform_handle_thunks", | 62 ":platform_handle_thunks", |
64 ] | 63 ] |
65 } | 64 } |
66 } | 65 } |
67 | 66 |
68 group("for_component") { | 67 group("for_component") { |
69 public_deps = [ | 68 public_deps = [ |
70 ":platform_handle", | 69 ":platform_handle", |
71 ] | 70 ] |
72 if (is_component_build) { | 71 if (is_component_build) { |
73 deps = [ | 72 deps = [ |
74 ":platform_handle_impl", | 73 ":platform_handle_impl", |
75 ] | 74 ] |
76 } | 75 } |
77 } | 76 } |
OLD | NEW |