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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//content/common/common.gni") | 6 import("//content/common/common.gni") |
7 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") | 7 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") |
8 | 8 |
9 # See //content/BUILD.gn for how this works. | 9 # See //content/BUILD.gn for how this works. |
10 group("common") { | 10 group("common") { |
11 if (is_component_build) { | 11 if (is_component_build) { |
12 public_deps = [ | 12 public_deps = [ |
13 "//content", | 13 "//content", |
14 ] | 14 ] |
15 } else { | 15 } else { |
16 public_deps = [ | 16 public_deps = [ |
17 ":common_sources", | 17 ":common_sources", |
18 ] | 18 ] |
19 } | 19 } |
20 } | 20 } |
21 | 21 |
22 # This target allows other targets to depend on result_codes.h which is a | 22 # This target allows other targets to depend on result_codes.h which is a |
23 # header-only dependency, without bringing in all of content. | 23 # header-only dependency, without bringing in all of content. |
24 source_set("result_codes") { | 24 source_set("result_codes") { |
25 sources = [ | 25 sources = [ |
26 "result_codes.h", | 26 "result_codes.h", |
27 ] | 27 ] |
28 } | 28 } |
29 | 29 |
30 # Forces static linking for targets using the static_switches constants, even | |
31 # in the component build. This config makes it impossible to use the static | |
32 # switches target and use the rest of content at the same time, because the | |
33 # component export flags won't be consistent. | |
34 config("static_switches_defines") { | |
35 defines = [ "COMPILE_CONTENT_STATICALLY" ] | |
36 } | |
37 | |
38 # This target allows you to use the content_switches constants and statically | |
39 # link to it, without depending on the rest of content. This is only for use | |
40 # without content, or you will get multiply defined symbols. | |
41 source_set("static_switches") { | |
42 public = [ | |
43 "content_switches.h", | |
44 ] | |
45 sources = [ | |
46 "//content/common/content_export.h", | |
47 "content_switches.cc", | |
48 ] | |
49 | |
50 public_configs = [ ":static_switches_defines" ] | |
51 } | |
52 | |
53 source_set("common_sources") { | 30 source_set("common_sources") { |
54 visibility = [ "//content/*" ] | 31 visibility = [ "//content/*" ] |
55 | 32 |
56 sources = rebase_path(content_common_gypi_values.public_common_sources, | 33 sources = rebase_path(content_common_gypi_values.public_common_sources, |
57 ".", | 34 ".", |
58 "//content") | 35 "//content") |
59 | 36 |
60 configs += [ | 37 configs += [ |
61 "//build/config:precompiled_headers", | 38 "//build/config:precompiled_headers", |
62 "//content:content_implementation", | 39 "//content:content_implementation", |
(...skipping 21 matching lines...) Expand all Loading... |
84 } | 61 } |
85 | 62 |
86 mojom("mojo_bindings") { | 63 mojom("mojo_bindings") { |
87 sources = [ | 64 sources = [ |
88 "background_sync.mojom", | 65 "background_sync.mojom", |
89 "mojo_geoposition.mojom", | 66 "mojo_geoposition.mojom", |
90 "permission_status.mojom", | 67 "permission_status.mojom", |
91 "service_worker_event_status.mojom", | 68 "service_worker_event_status.mojom", |
92 ] | 69 ] |
93 } | 70 } |
OLD | NEW |