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

Side by Side Diff: content/BUILD.gn

Issue 554393009: Make chrome GN build work in component mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo gyp changes Created 6 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 | « chrome/browser/BUILD.gn ('k') | content/app/BUILD.gn » ('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("//tools/grit/grit_rule.gni") 5 import("//tools/grit/grit_rule.gni")
6 6
7 # Applied by targets internal to content. 7 # Applied by targets internal to content.
8 config("content_implementation") { 8 config("content_implementation") {
9 defines = [ "CONTENT_IMPLEMENTATION" ] 9 defines = [ "CONTENT_IMPLEMENTATION" ]
10 } 10 }
11 11
12 # When targets depend on, e.g. //content/public/browser, what happens? To
13 # facilitate the complexity here, the "public" targets are groups that forward
14 # to the right thing depending on the build mode. Say for additional
15 # illustration, the public browser sources also depend on the public common
16 # ones.
17 #
18 # The non-component build is easy:
19 # foo ->
20 # //content/public/browser (group) ->
21 # //content/public/browser:browser_sources (source set) ->
22 # //content/browser (source set, this is the non-public browser target)
23 # //content/public/common:common_sources (source set)
24 #
25 # The component build is more complicated because we want everybody to depend on
26 # one content shared library regardless of which public target they depend on:
27 # foo ->
28 # //content/public/browser (group) ->
29 # //content (shared library) ->
30 # //content/public/browser:browser_sources (source set) ->
31 # //content/browser (source set; this is the non-public browser target)
32 # //content/public/common:common_sources (source set)
33 #
34 # That the internal content dependencies must depend on the *_sources targets
35 # to avoid dependency cycles, and external dependencies must depend on the
36 # //content/public/browser and similar targets to avoid double-linking (these
37 # targets make sure the dependency goes through the content shared library
38 # when doing a component build).
39
12 content_shared_components = [ 40 content_shared_components = [
13 "//content/gpu", 41 "//content/gpu",
14 "//content/plugin", 42 "//content/plugin",
15 "//content/public/browser:browser_sources", 43 "//content/public/browser:browser_sources",
16 "//content/public/child", 44 "//content/public/child:child_sources",
17 "//content/public/common", 45 "//content/public/common:common_sources",
18 "//content/public/plugin", 46 "//content/public/plugin:plugin_sources",
19 "//content/public/renderer", 47 "//content/public/renderer:renderer_sources",
20 "//content/public/utility", 48 "//content/public/utility:utility_sources",
21 "//content/renderer",
22 ] 49 ]
23 50
24 if (enable_plugins) { 51 if (enable_plugins) {
25 content_shared_components += [ "//content/ppapi_plugin" ] 52 content_shared_components += [ "//content/ppapi_plugin" ]
26 } 53 }
27 54
28 if (is_component_build) { 55 if (is_component_build) {
29 shared_library("content") { 56 shared_library("content") {
30 deps = content_shared_components + [ 57 deps = content_shared_components + [
31 "//content/app", 58 "//content/public/app:both_sources",
32 "//content/public/app",
33 ] 59 ]
34 forward_dependent_configs_from = deps 60 forward_dependent_configs_from = deps
35 } 61 }
36 } else { 62 } else {
37 group("content") { 63 group("content") {
38 deps = content_shared_components 64 deps = content_shared_components
39 } 65 }
40 } 66 }
41 67
42 grit("resources") { 68 grit("resources") {
43 source = "content_resources.grd" 69 source = "content_resources.grd"
44 use_qualified_include = true 70 use_qualified_include = true
45 outputs = [ 71 outputs = [
46 "grit/content_resources.h", 72 "grit/content_resources.h",
47 "content_resources.pak", 73 "content_resources.pak",
48 "content_resources.rc", 74 "content_resources.rc",
49 ] 75 ]
50 } 76 }
51 77
52 # This target exists to "hold" the content_export header so we can do proper 78 # This target exists to "hold" the content_export header so we can do proper
53 # inclusion testing of it. 79 # inclusion testing of it.
54 source_set("export") { 80 source_set("export") {
55 visibility = [ "//content/*" ] 81 visibility = [ "//content/*" ]
56 sources = [ 82 sources = [
57 "content/common/content_export.h" 83 "content/common/content_export.h"
58 ] 84 ]
59 } 85 }
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | content/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698