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