Commit 7e4c3314 authored by brettw@chromium.org's avatar brettw@chromium.org

Make content/common compile on Linux GN build.

BUG=
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/293963007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271982 0039d316-1c4b-4281-b951-d872f2087c98
parent 3565673c
......@@ -30,6 +30,7 @@ group("root") {
"//components/translate:translate_core_browser",
"//components/translate:translate_core_common",
"//components/url_matcher",
"//content/public/common",
"//crypto",
"//device/usb",
#"//extensions/common/api:extensions_api",
......@@ -83,6 +84,7 @@ group("root") {
if (is_android) {
deps -= [
"//components/os_crypt",
"//content/public/common",
"//crypto",
"//gpu/command_buffer/client", # Needs Skia.
"//gpu/command_buffer/service",
......
# 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.
# TODO(brettw) remove this and add a proper dependency on blink once that
# target has been converted to GN. This config sets up the include directories
# so content can compile in the meantime.
#
# This corresponds to third_party/WebKit/public/blink_headers.gyp:blink_headers
config("blink_headers_stub_config") {
include_dirs = [ "//third_party/WebKit" ]
}
# TODO(brettw) remove this and add a proper dependency on libjingle once that
# target has been converted to GN. This config sets up the include directories
# so content can compile in the meantime.
config("libjingle_stub_config") {
include_dirs = [
"//third_party/libjingle/overrides",
"//third_party/libjingle/source",
"//third_party",
"//third_party/libyuv/include",
"//third_party/usrsctp",
"//third_party/webrtc",
]
defines = [
"FEATURE_ENABLE_SSL",
"FEATURE_ENABLE_VOICEMAIL",
"EXPAT_RELATIVE_PATH",
"GTEST_RELATIVE_PATH",
"NO_MAIN_THREAD_WRAPPING",
"NO_SOUND_SYSTEM",
]
if (is_mac) {
defines += [ "OSX" ]
} else if (is_linux) {
defines += [ "LINUX" ]
} else if (is_android) {
defines += [ "ANDROID" ]
} else if (is_win) {
libs = [ "secur32.lib", "crypt32.lib", "iphlpapi.lib" ]
}
if (is_posix) {
defines += [ "POSIX" ]
}
if (is_chromeos) {
defines += [ "CHROMEOS" ]
}
}
......@@ -5,6 +5,8 @@
# TODO(brettw) this file is a work in progress, it is not currently hooked up
# to the build, but currently represents the state of content/common's deps.
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//content/common/common.gni")
source_set("common") {
......@@ -16,11 +18,17 @@ source_set("common") {
forward_dependent_configs_from = [
# TODO(GYP) convert these dependencies.
#'../third_party/WebKit/public/blink_headers.gyp:blink_headers',
#"//third_party/WebKit/public:blink_headers",
]
configs += [
"//content:blink_headers_stub_config",
"//content:libjingle_stub_config",
]
deps = [
"//base",
"//build/util:webkit_version",
"//components/tracing",
"//gpu/command_buffer/common",
"//net",
......@@ -32,8 +40,230 @@ source_set("common") {
"//ui/gfx/geometry",
"//url",
# TODO(GYP) convert these dependencies.
#'../third_party/WebKit/public/blink_headers.gyp:blink_headers',
#"//third_party/WebKit/public:blink_headers",
#'../third_party/libjingle/libjingle.gyp:libjingle',
#'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
]
if (!is_ios) {
deps += [
"//ipc",
"//gpu/command_buffer/client:gles2_c_lib",
"//gpu/command_buffer/client:gles2_implementation",
"//ui/gl",
#'../cc/cc.gyp:cc',
#'../gpu/gpu.gyp:command_buffer_service',
# TODO: the dependency on gl_in_process_context should be decoupled from
# content and moved to android_webview. See crbug.com/365797.
#'../gpu/gpu.gyp:gl_in_process_context',
#'../gpu/gpu.gyp:gpu_ipc',
#'../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings',
#'../media/media.gyp:media',
#'../media/media.gyp:shared_memory_support',
#'../mojo/mojo.gyp:mojo_environment_chromium',
#'../mojo/mojo.gyp:mojo_system_impl',
#'../third_party/WebKit/public/blink.gyp:blink',
#'../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
#'../webkit/common/webkit_common.gyp:webkit_common',
#'../webkit/storage_browser.gyp:webkit_storage_browser',
#'../webkit/storage_common.gyp:webkit_storage_common',
]
}
include_dirs = []
defines = [ "CONTENT_IMPLEMENTATION" ]
libs = []
ldflags = []
if (is_android && use_seccomp_bpf) {
set_sources_assignment_filter([])
sources += [
"sandbox_linux/sandbox_bpf_base_policy_linux.cc",
"sandbox_linux/sandbox_bpf_base_policy_linux.h",
]
set_sources_assignment_filter(sources_assignment_filter)
}
if (is_mac) {
sources += [
"gpu/client/gpu_memory_buffer_impl_io_surface.cc",
"gpu/client/gpu_memory_buffer_impl_io_surface.h",
]
sources -= [
"plugin_list_posix.cc",
]
# TODO(GYP) enable when converted to GN.
#deps += [
# "//webkit:webkit_resources",
#]
libs += [ "QuartzCore.framework" ]
}
if (is_android) {
sources += [
"gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
"gpu/client/gpu_memory_buffer_impl_surface_texture.h",
]
# TODO(GYP) enable when these targets are converted.
#deps += [
# "//content:content_jni_headers",
# "//content:common_aidl",
#]
libs += [ "android" ]
}
if (is_ios) {
sources -= [ "user_agent.cc" ]
assert(false, "Need to add lots of conditions here")
}
if (!use_ozone) {
sources -= [
"cursors/webcursor_ozone.cc",
"font_list_ozone.cc",
]
}
if (!use_aura || !use_x11) {
sources -= [ "cursors/webcursor_aurax11.cc" ]
}
if (use_pango) {
configs += [ "//build/config/linux:pangocairo" ]
if (use_ozone) {
# If we're using pango, never use this ozone file (it was removed in all
# non-ozone cases above).
sources -= [ "font_list_ozone.cc" ]
}
} else {
sources -= [
"font_list_pango.cc",
]
}
if (use_x11) {
include_dirs += [ "//third_party/khronos" ]
configs += [ "//build/config/linux:xcomposite" ]
if (cpu_arch != "arm" || !is_chromos) {
sources +=[
"gpu/x_util.cc",
"gpu/x_util.h",
]
}
}
if (enable_plugins) {
deps += [
# TODO(GYP) enable once supported in the GN build.
#"//ppapi:shared",
]
} else {
sources -= [
"pepper_plugin_list.cc",
"pepper_plugin_list.h",
"sandbox_util.cc",
]
}
if (is_android) {
sources += [
"gpu/media/android_video_decode_accelerator.cc",
"gpu/media/android_video_decode_accelerator.h",
]
deps += [
# TODO(GYP) enable once supported in the GN build.
#"//media",
]
if (enable_webrtc) {
deps += [ "//third_party/libyuv" ]
}
}
if (is_chromeos && use_x11) {
if (cpu_arch == "arm") {
sources += [
"gpu/media/exynos_v4l2_video_device.cc",
"gpu/media/exynos_v4l2_video_device.h",
"gpu/media/tegra_v4l2_video_device.cc",
"gpu/media/tegra_v4l2_video_device.h",
"gpu/media/v4l2_image_processor.cc",
"gpu/media/v4l2_image_processor.h",
"gpu/media/v4l2_video_decode_accelerator.cc",
"gpu/media/v4l2_video_decode_accelerator.h",
"gpu/media/v4l2_video_device.cc",
"gpu/media/v4l2_video_device.h",
"gpu/media/v4l2_video_encode_accelerator.cc",
"gpu/media/v4l2_video_encode_accelerator.h",
]
# TODO(GYP) enable once supported in the GN build.
#deps += [ "//media" ]
libs = [ "EGL", "GLESv2" ]
} else { # !arm
sources += [
"gpu/media/h264_dpb.cc",
"gpu/media/h264_dpb.h",
"gpu/media/va_surface.h",
"gpu/media/vaapi_h264_decoder.cc",
"gpu/media/vaapi_h264_decoder.h",
"gpu/media/vaapi_video_decode_accelerator.cc",
"gpu/media/vaapi_video_decode_accelerator.h",
"gpu/media/vaapi_wrapper.cc",
"gpu/media/vaapi_wrapper.h",
]
assert(false, "Implement generate_stubs for libva")
}
}
if (is_win) {
sources += [
"gpu/media/dxva_video_decode_accelerator.cc",
"gpu/media/dxva_video_decode_accelerator.h",
]
include_dirs += [ "//third_party/khronos" ]
deps += [
# TODO(GYP) enable once supported in the GN build.
#"//media",
"//ui/gl",
]
# TODO(GYP): extract_xinput action.
}
if (!is_win || !use_aura) {
sources -= [ "cursors/webcursor_aurawin.cc" ]
}
if (!use_aura || !use_x11) {
sources -= [ "cursors/webcursor_aurax11.cc" ]
}
if (use_seccomp_bpf) {
defines += [ "USE_SECCOMP_BPF" ]
} else {
if (is_linux) {
sources -= [
"sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
"sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
"sandbox_linux/bpf_gpu_policy_linux.cc",
"sandbox_linux/bpf_gpu_policy_linux.h",
"sandbox_linux/bpf_ppapi_policy_linux.cc",
"sandbox_linux/bpf_ppapi_policy_linux.h",
"sandbox_linux/bpf_renderer_policy_linux.cc",
"sandbox_linux/bpf_renderer_policy_linux.h",
"sandbox_linux/sandbox_bpf_base_policy_linux.cc",
"sandbox_linux/sandbox_bpf_base_policy_linux.h",
]
}
if (is_android) {
sources -= [
"sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
"sandbox_linux/android/sandbox_bpf_base_policy_android.h",
]
}
}
}
......@@ -472,11 +472,6 @@
}],
],
'conditions': [
['use_aura==1', {
'sources!': [
'common/cursors/webcursor_mac.mm',
],
}],
['OS=="ios"', {
# iOS has different user-agent construction utilities, since the
# version strings is not derived from webkit_version, and follows
......
......@@ -8,7 +8,16 @@ source_set("common") {
sources = rebase_path(content_common_gypi_values.public_common_sources,
".", "//content")
defines = [ "CONTENT_IMPLEMENTATION" ]
configs += [
# TODO(GYP) remove when blink_headers target is converted.
"//content:blink_headers_stub_config",
]
deps = [
"//content/common",
"//skia",
#"//third_party/WebKit/public:blink_headers",
]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment