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