[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 | |
[email protected] | 0e04359 | 2014-07-28 19:47:04 | [diff] [blame] | 12 | content_shared_components = [ |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 13 | "//content/gpu", |
| 14 | "//content/plugin", |
| 15 | "//content/ppapi_plugin", |
| 16 | "//content/public/app", |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 17 | "//content/public/browser:sources", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 18 | "//content/public/child", |
[email protected] | 0e04359 | 2014-07-28 19:47:04 | [diff] [blame] | 19 | "//content/public/common", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 20 | "//content/public/plugin", |
| 21 | "//content/public/renderer", |
| 22 | "//content/renderer", |
| 23 | "//content/utility", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 24 | ] |
| 25 | |
| 26 | if (is_component_build) { |
| 27 | shared_library("content") { |
[email protected] | 0e04359 | 2014-07-28 19:47:04 | [diff] [blame] | 28 | deps = content_shared_components + [ |
| 29 | "//content/app", |
| 30 | ] |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 31 | forward_dependent_configs_from = deps |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 32 | } |
| 33 | } else { |
| 34 | group("content") { |
[email protected] | 0e04359 | 2014-07-28 19:47:04 | [diff] [blame] | 35 | deps = content_shared_components |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 36 | } |
| 37 | } |
| 38 | |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 39 | grit("resources") { |
| 40 | source = "content_resources.grd" |
[email protected] | ae8d0898 | 2014-08-20 19:42:29 | [diff] [blame^] | 41 | use_qualified_include = true |
[email protected] | b89c5384 | 2014-07-23 16:32:32 | [diff] [blame] | 42 | outputs = [ |
| 43 | "grit/content_resources.h", |
| 44 | "content_resources.pak", |
| 45 | "content_resources.rc", |
| 46 | ] |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 47 | } |
| 48 | |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 49 | # This target exists to "hold" the content_export header so we can do proper |
| 50 | # inclusion testing of it. |
| 51 | source_set("export") { |
| 52 | visibility = "//content/*" |
| 53 | sources = [ |
| 54 | "content/common/content_export.h" |
| 55 | ] |
| 56 | } |
| 57 | |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 58 | # Stubs ------------------------------------------------------------------------ |
| 59 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 60 | # TODO(brettw) remove this and add a proper dependency on libjingle once that |
| 61 | # target has been converted to GN. This config sets up the include directories |
| 62 | # so content can compile in the meantime. |
| 63 | config("libjingle_stub_config") { |
| 64 | include_dirs = [ |
| 65 | "//third_party/libjingle/overrides", |
| 66 | "//third_party/libjingle/source", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 67 | "//third_party/libyuv/include", |
| 68 | "//third_party/usrsctp", |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 69 | |
| 70 | |
| 71 | "//third_party/webrtc/overrides", # Must be before webrtc abd third_party. |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 72 | "//third_party/webrtc", |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 73 | "//third_party", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 74 | ] |
| 75 | |
| 76 | defines = [ |
| 77 | "FEATURE_ENABLE_SSL", |
| 78 | "FEATURE_ENABLE_VOICEMAIL", |
| 79 | "EXPAT_RELATIVE_PATH", |
| 80 | "GTEST_RELATIVE_PATH", |
| 81 | "NO_MAIN_THREAD_WRAPPING", |
| 82 | "NO_SOUND_SYSTEM", |
| 83 | ] |
| 84 | |
| 85 | if (is_mac) { |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 86 | defines += [ "OSX", "WEBRTC_MAC" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 87 | } else if (is_linux) { |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 88 | defines += [ "LINUX", "WEBRTC_LINUX" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 89 | } else if (is_android) { |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 90 | defines += [ "ANDROID", "WEBRTC_LINUX", "WEBRTC_ANDROID" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 91 | } else if (is_win) { |
| 92 | libs = [ "secur32.lib", "crypt32.lib", "iphlpapi.lib" ] |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 93 | defines += [ "WEBRTC_WIN" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | if (is_posix) { |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 97 | defines += [ "POSIX", "WEBRTC_POSIX" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 98 | } |
| 99 | if (is_chromeos) { |
| 100 | defines += [ "CHROMEOS" ] |
| 101 | } |
| 102 | } |
| 103 | |
[email protected] | 9786502 | 2014-06-13 23:18:04 | [diff] [blame] | 104 | # Sets up include dirs while webrtc is being converted to GN. |
| 105 | # TODO(GYP) remove when webrtc is ready. |
| 106 | config("webrtc_stub_config") { |
| 107 | defines = [ "WEBRTC_CHROMIUM_BUILD" ] |
| 108 | include_dirs = [ |
| 109 | "//third_party/webrtc/overrides", # Must be first. |
| 110 | "//third_party", |
| 111 | ] |
| 112 | |
| 113 | if (is_mac) { |
| 114 | defines += [ "WEBRTC_MAC" ] |
| 115 | } else if (is_win) { |
| 116 | defines += [ "WEBRTC_WIN" ] |
| 117 | } else if (is_linux) { |
| 118 | defines += [ "WEBRTC_LINUX" ] |
| 119 | } else if (is_ios) { |
| 120 | defines += [ "WEBRTC_MAC", "WEBRTC_IOS" ] |
| 121 | } else if (is_android) { |
| 122 | defines += [ "WEBRTC_LINUX", "WEBRTC_ANDROID" ] |
| 123 | import("//build/config/crypto.gni") |
| 124 | if (use_openssl) { |
| 125 | defines += [ "WEBRTC_ANDROID_OPENSLEQS" ] |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | if (is_posix) { |
| 130 | defines += [ "WEBRTC_POSIX" ] |
| 131 | } |
| 132 | } |