blob: 6c6427074c9824c3b498a8c5110dd0e31913e123 [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]dab154ee2014-06-13 23:48:5012content_components = [
13 "//content/app",
14 "//content/browser",
15 "//content/child",
16 "//content/gpu",
17 "//content/plugin",
18 "//content/ppapi_plugin",
19 "//content/public/app",
20 "//content/public/browser",
21 "//content/public/child",
22 "//content/public/plugin",
23 "//content/public/renderer",
24 "//content/renderer",
25 "//content/utility",
26 "//content/worker",
27]
28
29if (is_component_build) {
30 shared_library("content") {
31 deps = content_components
32 }
33} else {
34 group("content") {
35 deps = content_components
36 }
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) {
85 defines += [ "OSX" ]
86 } else if (is_linux) {
87 defines += [ "LINUX" ]
88 } else if (is_android) {
89 defines += [ "ANDROID" ]
90 } else if (is_win) {
91 libs = [ "secur32.lib", "crypt32.lib", "iphlpapi.lib" ]
92 }
93
94 if (is_posix) {
95 defines += [ "POSIX" ]
96 }
97 if (is_chromeos) {
98 defines += [ "CHROMEOS" ]
99 }
100}
101
[email protected]97865022014-06-13 23:18:04102# Sets up include dirs while webrtc is being converted to GN.
103# TODO(GYP) remove when webrtc is ready.
104config("webrtc_stub_config") {
105 defines = [ "WEBRTC_CHROMIUM_BUILD" ]
106 include_dirs = [
107 "//third_party/webrtc/overrides", # Must be first.
108 "//third_party",
109 ]
110
111 if (is_mac) {
112 defines += [ "WEBRTC_MAC" ]
113 } else if (is_win) {
114 defines += [ "WEBRTC_WIN" ]
115 } else if (is_linux) {
116 defines += [ "WEBRTC_LINUX" ]
117 } else if (is_ios) {
118 defines += [ "WEBRTC_MAC", "WEBRTC_IOS" ]
119 } else if (is_android) {
120 defines += [ "WEBRTC_LINUX", "WEBRTC_ANDROID" ]
121 import("//build/config/crypto.gni")
122 if (use_openssl) {
123 defines += [ "WEBRTC_ANDROID_OPENSLEQS" ]
124 }
125 }
126
127 if (is_posix) {
128 defines += [ "WEBRTC_POSIX" ]
129 }
130}