blob: 94c944da9cc2b192c5e3f551113f6caba541b904 [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",
[email protected]22fe91d2014-08-12 17:07:1217 "//content/public/browser:sources",
[email protected]dab154ee2014-06-13 23:48:5018 "//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]22fe91d2014-08-12 17:07:1231 forward_dependent_configs_from = deps
[email protected]dab154ee2014-06-13 23:48:5032 }
33} else {
34 group("content") {
[email protected]0e043592014-07-28 19:47:0435 deps = content_shared_components
[email protected]dab154ee2014-06-13 23:48:5036 }
37}
38
[email protected]189add52014-05-28 16:51:4439grit("resources") {
40 source = "content_resources.grd"
[email protected]b89c53842014-07-23 16:32:3241 outputs = [
42 "grit/content_resources.h",
43 "content_resources.pak",
44 "content_resources.rc",
45 ]
[email protected]189add52014-05-28 16:51:4446}
47
[email protected]dab154ee2014-06-13 23:48:5048# This target exists to "hold" the content_export header so we can do proper
49# inclusion testing of it.
50source_set("export") {
51 visibility = "//content/*"
52 sources = [
53 "content/common/content_export.h"
54 ]
55}
56
[email protected]189add52014-05-28 16:51:4457# Stubs ------------------------------------------------------------------------
58
[email protected]7e4c33142014-05-21 22:01:3259# TODO(brettw) remove this and add a proper dependency on libjingle once that
60# target has been converted to GN. This config sets up the include directories
61# so content can compile in the meantime.
62config("libjingle_stub_config") {
63 include_dirs = [
64 "//third_party/libjingle/overrides",
65 "//third_party/libjingle/source",
[email protected]7e4c33142014-05-21 22:01:3266 "//third_party/libyuv/include",
67 "//third_party/usrsctp",
[email protected]189add52014-05-28 16:51:4468
69
70 "//third_party/webrtc/overrides", # Must be before webrtc abd third_party.
[email protected]7e4c33142014-05-21 22:01:3271 "//third_party/webrtc",
[email protected]189add52014-05-28 16:51:4472 "//third_party",
[email protected]7e4c33142014-05-21 22:01:3273 ]
74
75 defines = [
76 "FEATURE_ENABLE_SSL",
77 "FEATURE_ENABLE_VOICEMAIL",
78 "EXPAT_RELATIVE_PATH",
79 "GTEST_RELATIVE_PATH",
80 "NO_MAIN_THREAD_WRAPPING",
81 "NO_SOUND_SYSTEM",
82 ]
83
84 if (is_mac) {
[email protected]e758d4c2014-08-06 16:48:1685 defines += [ "OSX", "WEBRTC_MAC" ]
[email protected]7e4c33142014-05-21 22:01:3286 } else if (is_linux) {
[email protected]e758d4c2014-08-06 16:48:1687 defines += [ "LINUX", "WEBRTC_LINUX" ]
[email protected]7e4c33142014-05-21 22:01:3288 } else if (is_android) {
[email protected]e758d4c2014-08-06 16:48:1689 defines += [ "ANDROID", "WEBRTC_LINUX", "WEBRTC_ANDROID" ]
[email protected]7e4c33142014-05-21 22:01:3290 } else if (is_win) {
91 libs = [ "secur32.lib", "crypt32.lib", "iphlpapi.lib" ]
[email protected]e758d4c2014-08-06 16:48:1692 defines += [ "WEBRTC_WIN" ]
[email protected]7e4c33142014-05-21 22:01:3293 }
94
95 if (is_posix) {
[email protected]e758d4c2014-08-06 16:48:1696 defines += [ "POSIX", "WEBRTC_POSIX" ]
[email protected]7e4c33142014-05-21 22:01:3297 }
98 if (is_chromeos) {
99 defines += [ "CHROMEOS" ]
100 }
101}
102
[email protected]97865022014-06-13 23:18:04103# Sets up include dirs while webrtc is being converted to GN.
104# TODO(GYP) remove when webrtc is ready.
105config("webrtc_stub_config") {
106 defines = [ "WEBRTC_CHROMIUM_BUILD" ]
107 include_dirs = [
108 "//third_party/webrtc/overrides", # Must be first.
109 "//third_party",
110 ]
111
112 if (is_mac) {
113 defines += [ "WEBRTC_MAC" ]
114 } else if (is_win) {
115 defines += [ "WEBRTC_WIN" ]
116 } else if (is_linux) {
117 defines += [ "WEBRTC_LINUX" ]
118 } else if (is_ios) {
119 defines += [ "WEBRTC_MAC", "WEBRTC_IOS" ]
120 } else if (is_android) {
121 defines += [ "WEBRTC_LINUX", "WEBRTC_ANDROID" ]
122 import("//build/config/crypto.gni")
123 if (use_openssl) {
124 defines += [ "WEBRTC_ANDROID_OPENSLEQS" ]
125 }
126 }
127
128 if (is_posix) {
129 defines += [ "WEBRTC_POSIX" ]
130 }
131}