Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / content / gpu / BUILD.gn
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/ui.gni")
6 import("//content/content.gni")
7
8 # We don't support x64 prior to Win7 and D3DCompiler_43.dll is not needed on
9 # Vista+.
10 need_d3dcompiler = (is_win && cpu_arch == "x86" && directxsdk_exists)
11
12 source_set("gpu") {
13   visibility = "//content/*"
14   sources = [
15     "gpu_main.cc",
16     "gpu_process.cc",
17     "gpu_process.h",
18     "gpu_child_thread.cc",
19     "gpu_child_thread.h",
20     "gpu_watchdog_thread.cc",
21     "gpu_watchdog_thread.h",
22     "in_process_gpu_thread.cc",
23     "in_process_gpu_thread.h",
24   ]
25
26   configs += [ "//content:content_implementation" ]
27
28   deps = [
29     "//base",
30     "//content:export",
31     "//mojo/public/interfaces/application",
32     "//skia",
33     "//ui/gl",
34   ]
35
36   if (is_win) {
37     configs += [
38       "//third_party/khronos:khronos_headers",
39       "//third_party/wtl:wtl_includes",
40     ]
41     libs = [ "setupapi.lib" ]
42     deps += [
43       "//third_party/angle:libEGL",
44       "//third_party/angle:libGLESv2",
45     ]
46   }
47
48   if (need_d3dcompiler) {
49     deps += [ ":extract_d3dcompiler" ]
50   }
51
52   if (is_chromeos && cpu_arch != "arm") {
53     configs += [ "//third_party/libva/libva_config" ]
54   }
55
56   if (use_x11) {
57     deps += [ "//ui/events/platform/x11" ]
58   }
59 }
60
61 if (need_d3dcompiler) {
62   action("extract_d3dcompiler") {
63     visibility = ":*"
64     script = "//build/extract_from_cab.py"
65
66     cabfile = "//third_party/directxsdk/files/Redist/Jun2010_D3DCompiler_43_x86.cab"
67     dllfile = "D3DCompiler_43.dll"
68
69     inputs = [ cabfile ]
70     outputs = [ "$root_out_dir/$dllfile" ]
71
72     args = [
73       rebase_path(cabfile, root_build_dir),
74       dllfile,
75       rebase_path(root_out_dir, root_build_dir),
76     ]
77   }
78 }