Chromium Code Reviews| Index: third_party/openh264/BUILD.gn |
| diff --git a/third_party/openh264/BUILD.gn b/third_party/openh264/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e522ce06136992ce81d6ec5e671dbe14f76dde89 |
| --- /dev/null |
| +++ b/third_party/openh264/BUILD.gn |
| @@ -0,0 +1,91 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import("//third_party/openh264/openh264_args.gni") |
| + |
| +if (use_openh264) { |
|
brettw
2015/11/25 19:26:34
As-is, this is unnecessary because this file will
hbos_chromium
2015/11/26 12:19:24
Done.
|
| + # Import source and include variables from openh264.gypi. |
| + openh264_gypi_values = exec_script("//build/gypi_to_gn.py", |
| + [ rebase_path("openh264.gypi") ], |
| + "scope") |
| + |
| + # Config shared by all openh264 targets. |
| + config("openh264_config") { |
| + cflags = [] |
| + defines = [] |
| + |
| + # Compiler warnings to ignore. |
| + if (!is_win) { |
| + # GCC flags |
| + cflags += [ |
| + "-Wno-header-hygiene", |
| + "-Wno-unused-value", |
| + ] |
| + } |
| + |
| + # Platform-specific defines. |
| + if (is_android) { |
| + # Android NDK is necessary for its cpufeatures and this define is what |
| + # OpenH264 code uses to check if it should be used. |
| + defines += [ "ANDROID_NDK" ] |
| + } |
| + } |
| + |
| + source_set("openh264_common") { |
| + sources = openh264_gypi_values.openh264_common_sources |
| + include_dirs = openh264_gypi_values.openh264_common_includes |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ "//build/config/compiler:no_chromium_code" ] |
| + configs += [ ":openh264_config" ] |
| + deps = [] |
| + if (is_android) { |
| + deps += [ |
| + # Defines "android_get/setCpu..." functions. The original OpenH264 build |
| + # files replaces these using macros for "wels_..." versions of the same |
| + # functions. We do not have access to these and use the <cpu-features.h> |
| + # ones instead. |
| + "//third_party/android_tools:cpu_features", |
| + ] |
| + } |
| + } |
| + |
| + source_set("openh264_processing") { |
| + sources = openh264_gypi_values.openh264_processing_sources |
| + include_dirs = openh264_gypi_values.openh264_processing_includes |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ "//build/config/compiler:no_chromium_code" ] |
| + configs += [ ":openh264_config" ] |
| + deps = [ |
| + ":openh264_common", |
| + ] |
| + } |
| + |
| + source_set("openh264_encoder") { |
| + sources = openh264_gypi_values.openh264_encoder_sources |
| + include_dirs = openh264_gypi_values.openh264_encoder_includes |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ "//build/config/compiler:no_chromium_code" ] |
| + configs += [ ":openh264_config" ] |
| + deps = [ |
| + ":openh264_common", |
| + ":openh264_processing", |
| + ] |
| + } |
| + |
| + source_set("openh264_decoder") { |
| + sources = openh264_gypi_values.openh264_decoder_sources |
| + include_dirs = openh264_gypi_values.openh264_decoder_includes |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ "//build/config/compiler:no_chromium_code" ] |
| + configs += [ ":openh264_config" ] |
| + deps = [ |
| + ":openh264_common", |
| + ":openh264_processing", |
| + ] |
| + defines = [ |
| + # Disables decoder_core.cpp debug prints. |
| + "CODEC_FOR_TESTBED", |
| + ] |
| + } |
| +} |