blob: fffa8efb5f5f6875a6aca817883a28fb62ca5a4d [file] [log] [blame]
[email protected]7e4c33142014-05-21 22:01:321# 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]189add52014-05-28 16:51:445import("//tools/grit/grit_rule.gni")
6
7# Applied by targets internal to content.
8config("content_implementation") {
9 defines = [ "CONTENT_IMPLEMENTATION" ]
10}
11
Brett Wilson8f1323042014-09-11 16:58:5612# 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]0e043592014-07-28 19:47:0440content_shared_components = [
sammcd06e3fc2015-04-28 00:14:5441 "//content/gpu:gpu_sources",
Brett Wilsone7487942014-09-09 23:37:2942 "//content/public/browser:browser_sources",
Brett Wilson8f1323042014-09-11 16:58:5643 "//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]dab154ee2014-06-13 23:48:5048]
49
jamesr50081742014-09-09 07:52:2250if (enable_plugins) {
sammcd06e3fc2015-04-28 00:14:5451 content_shared_components += [ "//content/ppapi_plugin:ppapi_plugin_sources" ]
jamesr50081742014-09-09 07:52:2252}
53
[email protected]dab154ee2014-06-13 23:48:5054if (is_component_build) {
55 shared_library("content") {
scottmg7afc4092014-12-03 19:22:4256 public_deps =
57 content_shared_components + [ "//content/public/app:both_sources" ]
[email protected]dab154ee2014-06-13 23:48:5058 }
59} else {
60 group("content") {
[email protected]0e043592014-07-28 19:47:0461 deps = content_shared_components
[email protected]dab154ee2014-06-13 23:48:5062 }
63}
64
[email protected]189add52014-05-28 16:51:4465grit("resources") {
66 source = "content_resources.grd"
[email protected]ae8d08982014-08-20 19:42:2967 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:3268 outputs = [
69 "grit/content_resources.h",
70 "content_resources.pak",
71 "content_resources.rc",
72 ]
[email protected]189add52014-05-28 16:51:4473}
74
[email protected]dab154ee2014-06-13 23:48:5075# This target exists to "hold" the content_export header so we can do proper
76# inclusion testing of it.
77source_set("export") {
brettw9af42622014-09-06 21:21:0278 visibility = [ "//content/*" ]
[email protected]dab154ee2014-06-13 23:48:5079 sources = [
tfarina9568fc62015-07-22 23:35:3880 "common/content_export.h",
[email protected]dab154ee2014-06-13 23:48:5081 ]
82}
dprankedb5527d72015-03-08 04:22:4783
brettw4f56c5982015-05-04 22:12:3984# In the GYP build, this file is listed in several targets. In GN just have
85# those targets depend on this one. This can be depended on for any
86# platform for simplicity, and is a no-op on non-Windows.
87source_set("startup_helper_win") {
88 if (is_win) {
dprankedb5527d72015-03-08 04:22:4789 sources = [
90 "app/startup_helper_win.cc",
91 "public/app/startup_helper_win.h",
92 ]
93
94 deps = [
95 "//base",
96 "//base:i18n",
97 "//sandbox",
98 ]
99 }
100}