[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 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 |
| 3 | # found in the LICENSE file. |
| 4 | |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 5 | import("//tools/grit/grit_rule.gni") |
| 6 | |
| 7 | # Applied by targets internal to content. |
| 8 | config("content_implementation") { |
| 9 | defines = [ "CONTENT_IMPLEMENTATION" ] |
| 10 | } |
| 11 | |
Brett Wilson | 8f132304 | 2014-09-11 16:58:56 | [diff] [blame] | 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 | |
[email protected] | 0e04359 | 2014-07-28 19:47:04 | [diff] [blame] | 40 | content_shared_components = [ |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 41 | "//content/gpu", |
Brett Wilson | e748794 | 2014-09-09 23:37:29 | [diff] [blame] | 42 | "//content/public/browser:browser_sources", |
Brett Wilson | 8f132304 | 2014-09-11 16:58:56 | [diff] [blame] | 43 | "//content/public/child:child_sources", |
| 44 | "//content/public/common:common_sources", |
| 45 | "//content/public/plugin:plugin_sources", |
| 46 | "//content/public/renderer:renderer_sources", |
| 47 | "//content/public/utility:utility_sources", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 48 | ] |
| 49 | |
jamesr | 5008174 | 2014-09-09 07:52:22 | [diff] [blame] | 50 | if (enable_plugins) { |
| 51 | content_shared_components += [ "//content/ppapi_plugin" ] |
| 52 | } |
| 53 | |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 54 | if (is_component_build) { |
| 55 | shared_library("content") { |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 56 | public_deps = |
| 57 | content_shared_components + [ "//content/public/app:both_sources" ] |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 58 | } |
| 59 | } else { |
| 60 | group("content") { |
[email protected] | 0e04359 | 2014-07-28 19:47:04 | [diff] [blame] | 61 | deps = content_shared_components |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 62 | } |
| 63 | } |
| 64 | |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 65 | grit("resources") { |
| 66 | source = "content_resources.grd" |
[email protected] | ae8d0898 | 2014-08-20 19:42:29 | [diff] [blame] | 67 | use_qualified_include = true |
[email protected] | b89c5384 | 2014-07-23 16:32:32 | [diff] [blame] | 68 | outputs = [ |
| 69 | "grit/content_resources.h", |
| 70 | "content_resources.pak", |
| 71 | "content_resources.rc", |
| 72 | ] |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 73 | } |
| 74 | |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 75 | # This target exists to "hold" the content_export header so we can do proper |
| 76 | # inclusion testing of it. |
| 77 | source_set("export") { |
brettw | 9af4262 | 2014-09-06 21:21:02 | [diff] [blame] | 78 | visibility = [ "//content/*" ] |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 79 | sources = [ |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 80 | "content/common/content_export.h", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 81 | ] |
| 82 | } |
dpranke | db5527d7 | 2015-03-08 04:22:47 | [diff] [blame^] | 83 | |
| 84 | if (is_win) { |
| 85 | source_set("content_startup_helper_win") { |
| 86 | sources = [ |
| 87 | "app/startup_helper_win.cc", |
| 88 | "public/app/startup_helper_win.h", |
| 89 | ] |
| 90 | |
| 91 | deps = [ |
| 92 | "//base", |
| 93 | "//base:i18n", |
| 94 | "//sandbox", |
| 95 | ] |
| 96 | } |
| 97 | } |