| # Copyright 2014 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("//build/buildflag_header.gni") |
| import("//build/config/chromecast_build.gni") |
| import("//build/config/features.gni") |
| import("//content/common/common.gni") |
| import("//mojo/public/tools/bindings/mojom.gni") |
| import("//third_party/webrtc/build/webrtc.gni") |
| |
| # See //content/BUILD.gn for how this works. |
| group("common") { |
| if (is_component_build) { |
| public_deps = [ |
| "//content", |
| ] |
| } else { |
| public_deps = [ |
| ":common_sources", |
| ] |
| } |
| } |
| |
| # This target allows other targets to depend on result_codes.h which is a |
| # header-only dependency, without bringing in all of content. |
| source_set("result_codes") { |
| sources = [ |
| "result_codes.h", |
| ] |
| } |
| |
| # This target allows other targets to depend on content_descriptors.h which is |
| # a header-only dependency, without bringing in all of content. |
| source_set("content_descriptors") { |
| sources = [ |
| "content_descriptors.h", |
| ] |
| |
| # The header uses V8_USE_EXTERNAL_STARTUP_DATA. |
| public_configs = [ "//v8:external_startup_data" ] |
| |
| deps = [ |
| "//ipc", |
| ] |
| } |
| |
| # Forces static linking for targets using the static_switches constants, even |
| # in the component build. This config makes it impossible to use the static |
| # switches target and use the rest of content at the same time, because the |
| # component export flags won't be consistent. |
| config("static_switches_defines") { |
| defines = [ "COMPILE_CONTENT_STATICALLY" ] |
| } |
| |
| # This target allows you to use the content_switches constants and statically |
| # link to it, without depending on the rest of content. This is only for use |
| # without content, or you will get multiply defined symbols. |
| source_set("static_switches") { |
| public = [ |
| "content_switches.h", |
| ] |
| sources = [ |
| "//content/common/content_export.h", |
| "content_switches.cc", |
| ] |
| |
| public_configs = [ ":static_switches_defines" ] |
| } |
| |
| # This target allows you to use the content_features constants and statically |
| # link to it, without depending on the rest of content. This is only for use |
| # without content, or you will get multiply defined symbols. |
| source_set("static_features") { |
| public = [ |
| "content_features.h", |
| ] |
| sources = [ |
| "//content/common/content_export.h", |
| "content_features.cc", |
| ] |
| public_deps = [ |
| "//base", |
| ] |
| |
| public_configs = [ ":static_switches_defines" ] |
| } |
| |
| source_set("common_sources") { |
| # External code should depend on via ":common" above. |
| visibility = [ "//content/*" ] |
| |
| sources = rebase_path(content_common_gypi_values.public_common_sources, |
| ".", |
| "//content") |
| |
| configs += [ |
| "//build/config:precompiled_headers", |
| "//content:content_implementation", |
| ] |
| |
| public_configs = [ "//v8:external_startup_data" ] |
| |
| public_deps = [ |
| "//content/common", |
| "//mojo/public/cpp/bindings", |
| "//services/shell/public/cpp", |
| "//services/shell/public/interfaces", |
| "//third_party/WebKit/public:blink_headers", |
| "//ui/accessibility", |
| "//url/ipc:url_ipc", |
| ] |
| deps = [ |
| # This looks needless as we have //content/common in public_deps, but it's |
| # needed because of allow_circular_includes_from. |
| "//content/common:mojo_bindings_cpp_sources", |
| "//ipc", |
| "//media", |
| "//mojo/common", |
| "//net", |
| "//ppapi/c", |
| "//services/shell/public/cpp", |
| "//skia", |
| "//storage/common", |
| "//third_party/icu", |
| "//ui/accessibility", |
| "//ui/base", |
| "//ui/gfx", |
| "//ui/gfx/ipc", |
| "//ui/gfx/ipc/color", |
| "//ui/gfx/ipc/geometry", |
| "//ui/gfx/ipc/skia", |
| "//ui/surface", |
| ] |
| |
| # //content/common needs to include public headers. |
| allow_circular_includes_from = [ |
| "//content/common", |
| "//content/common:mojo_bindings_cpp_sources", |
| ] |
| |
| if (!enable_plugins) { |
| sources -= [ |
| "pepper_plugin_info.cc", |
| "pepper_plugin_info.h", |
| ] |
| } |
| |
| if (enable_webrtc) { |
| sources += [ |
| "webrtc_ip_handling_policy.cc", |
| "webrtc_ip_handling_policy.h", |
| ] |
| } |
| } |
| |
| buildflag_header("features") { |
| header = "features.h" |
| |
| flags = [ "RTC_USE_H264=$rtc_use_h264" ] |
| } |
| |
| source_set("feature_h264_with_openh264_ffmpeg") { |
| deps = [ |
| ":features", |
| "//base", |
| ] |
| sources = [ |
| "feature_h264_with_openh264_ffmpeg.cc", |
| "feature_h264_with_openh264_ffmpeg.h", |
| ] |
| } |