Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: components/policy/BUILD.gn

Issue 2273783002: Move policy generated files to components/policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed headers Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/ownership/owner_settings_service.h ('k') | components/policy/core/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//components/policy/resources/policy_templates.gni") 7 import("//components/policy/resources/policy_templates.gni")
8 import("//third_party/protobuf/proto_library.gni") 8 import("//third_party/protobuf/proto_library.gni")
9 import("//tools/grit/grit_rule.gni") 9 import("//tools/grit/grit_rule.gni")
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 ] 56 ]
57 } 57 }
58 component("policy_component_common") { 58 component("policy_component_common") {
59 public_deps = [ 59 public_deps = [
60 "//components/policy/core/common", 60 "//components/policy/core/common",
61 ] 61 ]
62 } 62 }
63 } 63 }
64 64
65 if (enable_configuration_policy) { 65 if (enable_configuration_policy) {
66 # TODO(GYP_GONE) this component should use target_gen_dir instead but the GYP
67 # build puts everything into the following directory. We do the same for now.
68 # Fix when GYP is gone.
69 policy_gen_dir = "$root_gen_dir/policy"
70
71 # This protobuf is equivalent to chrome_settings.proto but shares messages 66 # This protobuf is equivalent to chrome_settings.proto but shares messages
72 # for policies of the same type, so that less classes have to be generated 67 # for policies of the same type, so that less classes have to be generated
73 # and compiled. 68 # and compiled.
74 cloud_policy_proto_path = "$policy_gen_dir/cloud_policy.proto" 69 cloud_policy_proto_path = "$target_gen_dir/proto/cloud_policy.proto"
75 70
76 # This is the "full" protobuf, which defines one protobuf message per 71 # This is the "full" protobuf, which defines one protobuf message per
77 # policy. It is also the format currently used by the server. 72 # policy. It is also the format currently used by the server.
78 chrome_settings_proto_path = "$policy_gen_dir/chrome_settings.proto" 73 chrome_settings_proto_path = "$target_gen_dir/proto/chrome_settings.proto"
79 74
80 constants_header_path = "$policy_gen_dir/policy_constants.h" 75 constants_header_path = "$target_gen_dir/policy_constants.h"
81 constants_source_path = "$policy_gen_dir/policy_constants.cc" 76 constants_source_path = "$target_gen_dir/policy_constants.cc"
82 protobuf_decoder_path = "$policy_gen_dir/cloud_policy_generated.cc" 77 protobuf_decoder_path = "$target_gen_dir/cloud_policy_generated.cc"
83 app_restrictions_path = "$policy_gen_dir/app_restrictions.xml" 78 app_restrictions_path = "$target_gen_dir/app_restrictions.xml"
84 risk_tag_header_path = "$policy_gen_dir/risk_tag.h" 79 risk_tag_header_path = "$target_gen_dir/risk_tag.h"
85 80
86 action("cloud_policy_code_generate") { 81 action("cloud_policy_code_generate") {
87 script = "tools/generate_policy_source.py" 82 script = "tools/generate_policy_source.py"
88 chrome_version_abspath = "//chrome/VERSION" 83 chrome_version_abspath = "//chrome/VERSION"
89 chrome_version_path = rebase_path(chrome_version_abspath, root_build_dir) 84 chrome_version_path = rebase_path(chrome_version_abspath, root_build_dir)
90 85
91 if (is_chromeos) { 86 if (is_chromeos) {
92 chromeos_flag = "1" 87 chromeos_flag = "1"
93 } else { 88 } else {
94 chromeos_flag = "0" 89 chromeos_flag = "0"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 public_deps = [ 155 public_deps = [
161 ":cloud_policy_proto_generated_compile_proto", 156 ":cloud_policy_proto_generated_compile_proto",
162 ] 157 ]
163 } 158 }
164 proto_library("cloud_policy_proto_generated_compile_proto") { 159 proto_library("cloud_policy_proto_generated_compile_proto") {
165 visibility = [ ":cloud_policy_proto_generated_compile" ] 160 visibility = [ ":cloud_policy_proto_generated_compile" ]
166 sources = [ 161 sources = [
167 cloud_policy_proto_path, 162 cloud_policy_proto_path,
168 ] 163 ]
169 164
170 proto_out_dir = "policy/proto" 165 proto_out_dir = "components/policy/proto"
171 cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:" 166 cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:"
172 cc_include = "components/policy/policy_proto_export.h" 167 cc_include = "components/policy/proto/policy_proto_export.h"
173 component_build_force_source_set = true 168 component_build_force_source_set = true
174 defines = [ "POLICY_PROTO_COMPILATION" ] 169 defines = [ "POLICY_PROTO_COMPILATION" ]
175 170
176 deps = [ 171 deps = [
177 ":cloud_policy_code_generate", 172 ":cloud_policy_code_generate",
178 ] 173 ]
179 } 174 }
180 175
181 # This target builds the "full" protobuf, used for tests only. 176 # This target builds the "full" protobuf, used for tests only.
182 proto_library("chrome_settings_proto_generated_compile") { 177 proto_library("chrome_settings_proto_generated_compile") {
183 sources = [ 178 sources = [
184 chrome_settings_proto_path, 179 chrome_settings_proto_path,
185 ] 180 ]
186 proto_out_dir = "policy/proto" 181 proto_out_dir = "components/policy/proto"
187 182
188 deps = [ 183 deps = [
189 ":cloud_policy_code_generate", 184 ":cloud_policy_code_generate",
190 ":cloud_policy_proto_generated_compile", 185 ":cloud_policy_proto_generated_compile",
191 ] 186 ]
192 } 187 }
193 188
194 # The dependencies here are kind of messed up. 189 # The dependencies here are kind of messed up.
195 # 190 #
196 # //components/policy/core/browser and .../common depend on this target, 191 # //components/policy/core/browser and .../common depend on this target,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 "--grit_info", 411 "--grit_info",
417 rebase_path(grit_info_script, root_build_dir), 412 rebase_path(grit_info_script, root_build_dir),
418 ] + grit_defines 413 ] + grit_defines
419 deps = [ 414 deps = [
420 ":add_version", 415 ":add_version",
421 ":policy_templates", 416 ":policy_templates",
422 ] 417 ]
423 } 418 }
424 } 419 }
425 } 420 }
OLDNEW
« no previous file with comments | « components/ownership/owner_settings_service.h ('k') | components/policy/core/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698