Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / 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("//third_party/WebKit/Source/bindings/bindings.gni")
7 import("//third_party/WebKit/Source/config.gni")
8 import("//third_party/WebKit/Source/core/core.gni")
9 import("//third_party/WebKit/Source/modules/modules.gni")
10 import("//third_party/WebKit/Source/platform/platform.gni")
11
12 visibility = [ "//third_party/WebKit/*" ]
13 web_gypi = exec_script(
14     "//build/gypi_to_gn.py",
15     [ rebase_path("web.gypi") ],
16     "scope",
17     [ "web.gypi" ])
18
19
20 component("web") {
21   output_name = "blink_web"
22
23   deps = [
24     "//third_party/WebKit/Source/core",
25     "//third_party/WebKit/Source/modules",
26     "//third_party/WebKit/Source/platform",
27     "//skia",
28     "//third_party/icu",
29     "//v8",
30     "//third_party/angle:translator",
31   ]
32
33   include_dirs = [
34     "//third_party/skia/include/utils",
35   ]
36
37   configs -= [ "//build/config/compiler:chromium_code" ]
38   configs += [
39     "//build/config/compiler:no_chromium_code",
40     "//third_party/WebKit/Source:config",
41     "//third_party/WebKit/Source:inside_blink",
42     "//third_party/WebKit/Source:non_test_config",
43   ]
44
45   sources = web_gypi.web_files
46
47   if (!use_default_render_theme) {
48     sources -= [ "default/WebRenderTheme.cpp" ]
49   }
50
51   if (is_component_build) {
52     deps += [
53       "//base/test:test_support",
54       "//testing/gmock",
55       "//testing/gtest",
56       "//third_party/WebKit/Source/core:testing",
57       "//third_party/WebKit/Source/modules:modules_testing",
58       "//third_party/WebKit/Source/wtf:test_support",
59     ]
60
61     configs -= [
62       "//third_party/WebKit/Source:non_test_config",
63     ]
64
65     sources += web_gypi.web_unittest_files
66     sources += bindings_unittest_files
67     sources += core_unittest_files
68     sources += modules_unittest_files
69     sources += platform_web_unittest_files
70
71     sources += [ "WebTestingSupport.cpp" ]
72     include_dirs += [ "$root_gen_dir/blink" ]
73   }
74
75   if (is_android) {
76     set_sources_assignment_filter([])
77     sources += [ "linux/WebFontRendering.cpp" ]
78     set_sources_assignment_filter(sources_assignment_filter)
79   }
80 }
81
82 # GYP version: WebKit/Source/web/web.gyp:blink_web_test_support
83 source_set("test_support") {
84   if (!is_component_build) {
85     deps = [
86       "//skia",
87       "//third_party/WebKit/Source/core:testing",
88       "//third_party/WebKit/Source/modules:modules_testing",
89       "//third_party/WebKit/Source/wtf",
90       "//v8",
91     ]
92
93     sources = [ "WebTestingSupport.cpp" ]
94
95     configs -= [ "//build/config/compiler:chromium_code" ]
96     configs += [
97       "//build/config/compiler:no_chromium_code",
98       "//third_party/WebKit/Source:config",
99     ]
100
101     include_dirs = [
102       "$root_gen_dir/blink",
103     ]
104   }
105 }
106
107 # GYP version: WebKit/Source/web/web_tests.gyp:webkit_unit_tests
108 test("webkit_unit_tests") {
109   deps = [
110     ":test_support",
111     ":web",
112     "//base",
113     "//base/test:test_support",
114     "//base:i18n",
115     "//content/test:test_support",
116     "//testing/gmock",
117     "//testing/gtest",
118     "//third_party/WebKit/Source/wtf:test_support",
119     "//third_party/libwebp",
120     "//third_party/zlib",
121     "//url",
122     "//v8",
123   ]
124
125   sources = [ "tests/RunAllTests.cpp" ]
126
127   configs += [ "//third_party/WebKit/Source:config" ]
128
129   if (!is_component_build) {
130     deps += [ "//third_party/WebKit/Source/core" ]
131
132     configs += [ "//third_party/WebKit/Source:inside_blink" ]
133
134     sources += web_gypi.web_unittest_files
135     sources += bindings_unittest_files
136     sources += core_unittest_files
137     sources += modules_unittest_files
138     sources += platform_web_unittest_files
139   }
140 }