OLD | NEW |
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("//build/config/arm.gni") | 9 import("//build/config/arm.gni") |
10 import("//build/config/features.gni") | 10 import("//build/config/features.gni") |
11 import("//build/config/mips.gni") | 11 import("//build/config/mips.gni") |
12 import("//build_overrides/webrtc.gni") | 12 import("//build_overrides/webrtc.gni") |
| 13 import("//testing/test.gni") |
13 | 14 |
14 declare_args() { | 15 declare_args() { |
15 # Disable this to avoid building the Opus audio codec. | 16 # Disable this to avoid building the Opus audio codec. |
16 rtc_include_opus = true | 17 rtc_include_opus = true |
17 | 18 |
18 # Disable to use absolute header paths for some libraries. | 19 # Disable to use absolute header paths for some libraries. |
19 rtc_relative_path = true | 20 rtc_relative_path = true |
20 | 21 |
21 # Used to specify an external Jsoncpp include path when not compiling the | 22 # Used to specify an external Jsoncpp include path when not compiling the |
22 # library that comes with WebRTC (i.e. rtc_build_json == 0). | 23 # library that comes with WebRTC (i.e. rtc_build_json == 0). |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 declare_args() { | 142 declare_args() { |
142 # Include the iLBC audio codec? | 143 # Include the iLBC audio codec? |
143 rtc_include_ilbc = !(build_with_chromium || build_with_mozilla) | 144 rtc_include_ilbc = !(build_with_chromium || build_with_mozilla) |
144 } | 145 } |
145 | 146 |
146 # Make it possible to provide custom locations for some libraries (move these | 147 # Make it possible to provide custom locations for some libraries (move these |
147 # up into declare_args should we need to actually use them for the GN build). | 148 # up into declare_args should we need to actually use them for the GN build). |
148 rtc_libvpx_dir = "//third_party/libvpx" | 149 rtc_libvpx_dir = "//third_party/libvpx" |
149 rtc_libyuv_dir = "//third_party/libyuv" | 150 rtc_libyuv_dir = "//third_party/libyuv" |
150 rtc_opus_dir = "//third_party/opus" | 151 rtc_opus_dir = "//third_party/opus" |
| 152 |
| 153 ############################################################################### |
| 154 # Templates |
| 155 # |
| 156 |
| 157 # Points to //webrtc/ in webrtc stand-alone or to //third_party/webrtc/ in |
| 158 # chromium. |
| 159 # We need absolute paths for all configs in templates as they are shared in |
| 160 # different subdirectories. |
| 161 webrtc_root = get_path_info("../", "abspath") |
| 162 |
| 163 # Common configs to remove or add in all rtc targets. |
| 164 rtc_remove_configs = [] |
| 165 rtc_add_configs = [] |
| 166 |
| 167 set_defaults("rtc_test") { |
| 168 configs = [] |
| 169 suppressed_configs = [] |
| 170 } |
| 171 |
| 172 set_defaults("rtc_source_set") { |
| 173 configs = [] |
| 174 suppressed_configs = [] |
| 175 } |
| 176 |
| 177 set_defaults("rtc_executable") { |
| 178 configs = [] |
| 179 suppressed_configs = [] |
| 180 } |
| 181 |
| 182 set_defaults("rtc_static_library") { |
| 183 configs = [] |
| 184 suppressed_configs = [] |
| 185 } |
| 186 |
| 187 template("rtc_test") { |
| 188 test(target_name) { |
| 189 forward_variables_from(invoker, |
| 190 "*", |
| 191 [ |
| 192 "configs", |
| 193 "suppressed_configs", |
| 194 ]) |
| 195 configs += invoker.configs |
| 196 configs += rtc_add_configs |
| 197 configs -= rtc_remove_configs |
| 198 configs -= invoker.suppressed_configs |
| 199 } |
| 200 } |
| 201 |
| 202 template("rtc_source_set") { |
| 203 source_set(target_name) { |
| 204 forward_variables_from(invoker, |
| 205 "*", |
| 206 [ |
| 207 "configs", |
| 208 "suppressed_configs", |
| 209 ]) |
| 210 configs += invoker.configs |
| 211 configs += rtc_add_configs |
| 212 configs -= rtc_remove_configs |
| 213 configs -= invoker.suppressed_configs |
| 214 } |
| 215 } |
| 216 |
| 217 template("rtc_executable") { |
| 218 executable(target_name) { |
| 219 forward_variables_from(invoker, |
| 220 "*", |
| 221 [ |
| 222 "configs", |
| 223 "suppressed_configs", |
| 224 ]) |
| 225 configs += invoker.configs |
| 226 configs += rtc_add_configs |
| 227 configs -= rtc_remove_configs |
| 228 configs -= invoker.suppressed_configs |
| 229 } |
| 230 } |
| 231 |
| 232 template("rtc_static_library") { |
| 233 static_library(target_name) { |
| 234 forward_variables_from(invoker, |
| 235 "*", |
| 236 [ |
| 237 "configs", |
| 238 "suppressed_configs", |
| 239 ]) |
| 240 configs += invoker.configs |
| 241 configs += rtc_add_configs |
| 242 configs -= rtc_remove_configs |
| 243 configs -= invoker.suppressed_configs |
| 244 } |
| 245 } |
OLD | NEW |