Chromium Code Reviews| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 declare_args() { | 138 declare_args() { |
| 138 # Include the iLBC audio codec? | 139 # Include the iLBC audio codec? |
| 139 rtc_include_ilbc = !(build_with_chromium || build_with_mozilla) | 140 rtc_include_ilbc = !(build_with_chromium || build_with_mozilla) |
| 140 } | 141 } |
| 141 | 142 |
| 142 # Make it possible to provide custom locations for some libraries (move these | 143 # Make it possible to provide custom locations for some libraries (move these |
| 143 # up into declare_args should we need to actually use them for the GN build). | 144 # up into declare_args should we need to actually use them for the GN build). |
| 144 rtc_libvpx_dir = "//third_party/libvpx" | 145 rtc_libvpx_dir = "//third_party/libvpx" |
| 145 rtc_libyuv_dir = "//third_party/libyuv" | 146 rtc_libyuv_dir = "//third_party/libyuv" |
| 146 rtc_opus_dir = "//third_party/opus" | 147 rtc_opus_dir = "//third_party/opus" |
| 148 | |
| 149 ############################################################################### | |
| 150 # Templates | |
| 151 # | |
| 152 | |
| 153 # Points to //webrtc/ in webrtc stand-alone or to //third_party/webrtc/ in | |
| 154 # chromium. | |
| 155 # We need absolute paths for all configs in templates as they are shared in | |
| 156 # different subdirectories. | |
| 157 webrtc_root = get_path_info("../", "abspath") | |
| 158 | |
| 159 # Common configs to remove or add in all rtc targets. | |
| 160 rtc_remove_configs = [] | |
| 161 rtc_add_configs = [] | |
| 162 | |
| 163 set_defaults("rtc_test") { | |
| 164 configs = [] | |
| 165 configs_suppressions = [] | |
|
kjellander_webrtc
2016/09/01 19:55:29
I'm not fully happy with this name, as we're using
| |
| 166 } | |
| 167 | |
| 168 set_defaults("rtc_source_set") { | |
| 169 configs = [] | |
| 170 configs_suppressions = [] | |
| 171 } | |
| 172 | |
| 173 set_defaults("rtc_executable") { | |
| 174 configs = [] | |
| 175 configs_suppressions = [] | |
| 176 } | |
| 177 | |
| 178 set_defaults("rtc_static_library") { | |
| 179 configs = [] | |
| 180 configs_suppressions = [] | |
| 181 } | |
| 182 | |
| 183 template("rtc_test") { | |
| 184 test(target_name) { | |
| 185 forward_variables_from(invoker, | |
| 186 "*", | |
| 187 [ | |
| 188 "configs", | |
| 189 "configs_suppressions", | |
| 190 ]) | |
| 191 configs += invoker.configs | |
| 192 configs += rtc_add_configs | |
| 193 configs -= rtc_remove_configs | |
| 194 configs -= invoker.configs_suppressions | |
| 195 } | |
| 196 } | |
| 197 | |
| 198 template("rtc_source_set") { | |
| 199 source_set(target_name) { | |
| 200 forward_variables_from(invoker, | |
| 201 "*", | |
| 202 [ | |
| 203 "configs", | |
| 204 "configs_suppressions", | |
| 205 ]) | |
| 206 configs += invoker.configs | |
| 207 configs += rtc_add_configs | |
| 208 configs -= rtc_remove_configs | |
| 209 configs -= invoker.configs_suppressions | |
| 210 } | |
| 211 } | |
| 212 | |
| 213 template("rtc_executable") { | |
| 214 executable(target_name) { | |
| 215 forward_variables_from(invoker, | |
| 216 "*", | |
| 217 [ | |
| 218 "configs", | |
| 219 "configs_suppressions", | |
| 220 ]) | |
| 221 configs += invoker.configs | |
| 222 configs += rtc_add_configs | |
| 223 configs -= rtc_remove_configs | |
| 224 configs -= invoker.configs_suppressions | |
| 225 } | |
| 226 } | |
| 227 | |
| 228 template("rtc_static_library") { | |
| 229 static_library(target_name) { | |
| 230 forward_variables_from(invoker, | |
| 231 "*", | |
| 232 [ | |
| 233 "configs", | |
| 234 "configs_suppressions", | |
| 235 ]) | |
| 236 configs += invoker.configs | |
| 237 configs += rtc_add_configs | |
| 238 configs -= rtc_remove_configs | |
| 239 configs -= invoker.configs_suppressions | |
| 240 } | |
| 241 } | |
| OLD | NEW |