Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Unified Diff: content/common/BUILD.gn

Issue 293963007: Make content/common compile on Linux GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | content/public/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/BUILD.gn
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 21a8e139c8f752c12e6cf826236516734c30b699..1bdac10f6960e1652479b1ad628d618c52695684 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -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") {
@@ -19,8 +21,11 @@ source_set("common") {
#'../third_party/WebKit/public/blink_headers.gyp:blink_headers',
]
+ configs += [ ":libjingle_stub_config" ]
+
deps = [
"//base",
+ "//build/util:webkit_version",
"//components/tracing",
"//gpu/command_buffer/common",
"//net",
@@ -36,4 +41,265 @@ source_set("common") {
#'../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",
+ ]
+
+ if (use_aura) {
+ sources -= [ "cursors/webcursor_mac.mm" ]
scottmg 2014/05/21 00:30:33 this seems like it's in the wrong place because ma
brettw 2014/05/21 01:35:18 The GYP code for this that I copied was just buste
+ }
+
+ # 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" ]
+ } else {
+ sources -= [
+ "font_list_pango.cc",
scottmg 2014/05/21 00:30:33 the gyp excludes font_list_ozone, not pango?
brettw 2014/05/21 01:35:18 _pango is implicit in GYP, but I didn't think its
scottmg 2014/05/21 02:42:33 but it removes font_list_ozone.cc if use_pango==1
brettw 2014/05/21 17:09:09 I see, I think you're right. I'll fix it.
+ ]
+ }
+
+ 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",
+ ]
+ }
+ }
+}
+
+# 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/common 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" ]
+ }
}
+
« no previous file with comments | « BUILD.gn ('k') | content/public/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698