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("//third_party/protobuf/proto_library.gni") | 6 import("//third_party/protobuf/proto_library.gni") |
7 import("//tools/grit/grit_rule.gni") | 7 import("//tools/grit/grit_rule.gni") |
8 | 8 |
9 if (is_component_build) { | 9 if (is_component_build) { |
10 component("policy_component") { | 10 component("policy_component") { |
11 deps = [ | 11 deps = [ |
12 "//components/policy/core/browser", | 12 "//components/policy/core/browser", |
13 "//components/policy/core/common", | 13 "//components/policy/core/common", |
14 ] | 14 ] |
15 } | 15 } |
16 group("policy_component_browser") { | 16 group("policy_component_browser") { |
17 deps = [ ":policy_component" ] | 17 deps = [ |
| 18 ":policy_component", |
| 19 ] |
18 } | 20 } |
19 group("policy_component_common") { | 21 group("policy_component_common") { |
20 deps = [ ":policy_component" ] | 22 deps = [ |
| 23 ":policy_component", |
| 24 ] |
21 } | 25 } |
22 } else { # Compile to separate libraries. | 26 } else { # Compile to separate libraries. |
23 group("policy_component") { | 27 group("policy_component") { |
24 deps = [ | 28 deps = [ |
25 ":policy_component_browser", | 29 ":policy_component_browser", |
26 ":policy_component_common", | 30 ":policy_component_common", |
27 ] | 31 ] |
28 } | 32 } |
29 component("policy_component_browser") { | 33 component("policy_component_browser") { |
30 deps = [ "//components/policy/core/browser" ] | 34 deps = [ |
| 35 "//components/policy/core/browser", |
| 36 ] |
31 } | 37 } |
32 component("policy_component_common") { | 38 component("policy_component_common") { |
33 deps = [ "//components/policy/core/common" ] | 39 deps = [ |
| 40 "//components/policy/core/common", |
| 41 ] |
34 } | 42 } |
35 } | 43 } |
36 | 44 |
37 if (enable_configuration_policy) { | 45 if (enable_configuration_policy) { |
38 # TODO(brettw) this component should use target_gen_dir instead but the GYP | 46 # TODO(brettw) this component should use target_gen_dir instead but the GYP |
39 # build puts everything into the following directory. We do the same for now. | 47 # build puts everything into the following directory. We do the same for now. |
40 policy_gen_dir = "$root_gen_dir/policy" | 48 policy_gen_dir = "$root_gen_dir/policy" |
41 | 49 |
42 # This protobuf is equivalent to chrome_settings.proto but shares messages | 50 # This protobuf is equivalent to chrome_settings.proto but shares messages |
43 # for policies of the same type, so that less classes have to be generated | 51 # for policies of the same type, so that less classes have to be generated |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 rebase_path(cloud_policy_proto_path, root_build_dir), | 91 rebase_path(cloud_policy_proto_path, root_build_dir), |
84 "--cloud-policy-decoder=" + | 92 "--cloud-policy-decoder=" + |
85 rebase_path(protobuf_decoder_path, root_build_dir), | 93 rebase_path(protobuf_decoder_path, root_build_dir), |
86 os, | 94 os, |
87 chromeos_flag, | 95 chromeos_flag, |
88 rebase_path("resources/policy_templates.json", root_build_dir), | 96 rebase_path("resources/policy_templates.json", root_build_dir), |
89 ] | 97 ] |
90 } | 98 } |
91 | 99 |
92 proto_library("cloud_policy_proto_generated_compile") { | 100 proto_library("cloud_policy_proto_generated_compile") { |
93 sources = [ cloud_policy_proto_path ] | 101 sources = [ |
| 102 cloud_policy_proto_path, |
| 103 ] |
94 | 104 |
95 proto_out_dir = "policy/proto" | 105 proto_out_dir = "policy/proto" |
96 cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:" | 106 cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:" |
97 cc_include = "components/policy/policy_proto_export.h" | 107 cc_include = "components/policy/policy_proto_export.h" |
98 defines = [ "POLICY_PROTO_COMPILATION" ] | 108 defines = [ "POLICY_PROTO_COMPILATION" ] |
99 | 109 |
100 deps = [ | 110 deps = [ |
101 ":cloud_policy_code_generate", | 111 ":cloud_policy_code_generate", |
102 ] | 112 ] |
103 } | 113 } |
104 | 114 |
105 # This target builds the "full" protobuf, used for tests only. | 115 # This target builds the "full" protobuf, used for tests only. |
106 proto_library("chrome_settings_proto_generated_compile") { | 116 proto_library("chrome_settings_proto_generated_compile") { |
107 sources = [ chrome_settings_proto_path ] | 117 sources = [ |
| 118 chrome_settings_proto_path, |
| 119 ] |
108 proto_out_dir = "policy/proto" | 120 proto_out_dir = "policy/proto" |
109 | 121 |
110 deps = [ | 122 deps = [ |
111 ":cloud_policy_code_generate", | 123 ":cloud_policy_code_generate", |
112 ":cloud_policy_proto_generated_compile", | 124 ":cloud_policy_proto_generated_compile", |
113 ] | 125 ] |
114 } | 126 } |
115 | 127 |
116 static_library("policy") { | 128 static_library("policy") { |
117 sources = [ | 129 sources = [ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 187 |
176 deps = [ | 188 deps = [ |
177 ":policy_component", | 189 ":policy_component", |
178 ":test_support", | 190 ":test_support", |
179 "//components/policy/proto", | 191 "//components/policy/proto", |
180 "//testing/gmock", | 192 "//testing/gmock", |
181 "//testing/gtest", | 193 "//testing/gtest", |
182 ] | 194 ] |
183 } | 195 } |
184 } | 196 } |
185 | |
186 #TODO(GYP) policy templates, chrome_manifest_bundle | 197 #TODO(GYP) policy templates, chrome_manifest_bundle |
OLD | NEW |