blob: a49a8873ad564258df5c302c5cb55bc14b55559c [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
[email protected]0e043592014-07-28 19:47:0412content_shared_components = [
[email protected]dab154ee2014-06-13 23:48:5013 "//content/gpu",
14 "//content/plugin",
15 "//content/ppapi_plugin",
16 "//content/public/app",
17 "//content/public/browser",
18 "//content/public/child",
[email protected]0e043592014-07-28 19:47:0419 "//content/public/common",
[email protected]dab154ee2014-06-13 23:48:5020 "//content/public/plugin",
21 "//content/public/renderer",
22 "//content/renderer",
23 "//content/utility",
[email protected]dab154ee2014-06-13 23:48:5024]
25
26if (is_component_build) {
27 shared_library("content") {
[email protected]0e043592014-07-28 19:47:0428 deps = content_shared_components + [
29 "//content/app",
30 ]
[email protected]dab154ee2014-06-13 23:48:5031 }
32} else {
33 group("content") {
[email protected]0e043592014-07-28 19:47:0434 deps = content_shared_components
[email protected]dab154ee2014-06-13 23:48:5035 }
36}
37
[email protected]189add52014-05-28 16:51:4438grit("resources") {
39 source = "content_resources.grd"
[email protected]b89c53842014-07-23 16:32:3240 outputs = [
41 "grit/content_resources.h",
42 "content_resources.pak",
43 "content_resources.rc",
44 ]
[email protected]189add52014-05-28 16:51:4445}
46
[email protected]dab154ee2014-06-13 23:48:5047# This target exists to "hold" the content_export header so we can do proper
48# inclusion testing of it.
49source_set("export") {
50 visibility = "//content/*"
51 sources = [
52 "content/common/content_export.h"
53 ]
54}
55
[email protected]189add52014-05-28 16:51:4456# Stubs ------------------------------------------------------------------------
57
[email protected]7e4c33142014-05-21 22:01:3258# TODO(brettw) remove this and add a proper dependency on libjingle once that
59# target has been converted to GN. This config sets up the include directories
60# so content can compile in the meantime.
61config("libjingle_stub_config") {
62 include_dirs = [
63 "//third_party/libjingle/overrides",
64 "//third_party/libjingle/source",
[email protected]7e4c33142014-05-21 22:01:3265 "//third_party/libyuv/include",
66 "//third_party/usrsctp",
[email protected]189add52014-05-28 16:51:4467
68
69 "//third_party/webrtc/overrides", # Must be before webrtc abd third_party.
[email protected]7e4c33142014-05-21 22:01:3270 "//third_party/webrtc",
[email protected]189add52014-05-28 16:51:4471 "//third_party",
[email protected]7e4c33142014-05-21 22:01:3272 ]
73
74 defines = [
75 "FEATURE_ENABLE_SSL",
76 "FEATURE_ENABLE_VOICEMAIL",
77 "EXPAT_RELATIVE_PATH",
78 "GTEST_RELATIVE_PATH",
79 "NO_MAIN_THREAD_WRAPPING",
80 "NO_SOUND_SYSTEM",
81 ]
82
83 if (is_mac) {
84 defines += [ "OSX" ]
85 } else if (is_linux) {
86 defines += [ "LINUX" ]
87 } else if (is_android) {
88 defines += [ "ANDROID" ]
89 } else if (is_win) {
90 libs = [ "secur32.lib", "crypt32.lib", "iphlpapi.lib" ]
91 }
92
93 if (is_posix) {
94 defines += [ "POSIX" ]
95 }
96 if (is_chromeos) {
97 defines += [ "CHROMEOS" ]
98 }
99}
100
[email protected]97865022014-06-13 23:18:04101# Sets up include dirs while webrtc is being converted to GN.
102# TODO(GYP) remove when webrtc is ready.
103config("webrtc_stub_config") {
104 defines = [ "WEBRTC_CHROMIUM_BUILD" ]
105 include_dirs = [
106 "//third_party/webrtc/overrides", # Must be first.
107 "//third_party",
108 ]
109
110 if (is_mac) {
111 defines += [ "WEBRTC_MAC" ]
112 } else if (is_win) {
113 defines += [ "WEBRTC_WIN" ]
114 } else if (is_linux) {
115 defines += [ "WEBRTC_LINUX" ]
116 } else if (is_ios) {
117 defines += [ "WEBRTC_MAC", "WEBRTC_IOS" ]
118 } else if (is_android) {
119 defines += [ "WEBRTC_LINUX", "WEBRTC_ANDROID" ]
120 import("//build/config/crypto.gni")
121 if (use_openssl) {
122 defines += [ "WEBRTC_ANDROID_OPENSLEQS" ]
123 }
124 }
125
126 if (is_posix) {
127 defines += [ "WEBRTC_POSIX" ]
128 }
129}