Upstream version 10.39.225.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   }
73
74   if (is_android) {
75     set_sources_assignment_filter([])
76     sources += [ "linux/WebFontRendering.cpp" ]
77     set_sources_assignment_filter(sources_assignment_filter)
78   }
79 }
80
81 # GYP version: WebKit/Source/web/web.gyp:blink_web_test_support
82 source_set("test_support") {
83   if (!is_component_build) {
84     deps = [
85       "//skia",
86       "//third_party/WebKit/Source/core:testing",
87       "//third_party/WebKit/Source/modules:modules_testing",
88       "//third_party/WebKit/Source/wtf",
89     ]
90
91     sources = [ "WebTestingSupport.cpp" ]
92
93     configs -= [ "//build/config/compiler:chromium_code" ]
94     configs += [
95       "//build/config/compiler:no_chromium_code",
96       "//third_party/WebKit/Source:config",
97     ]
98   }
99 }
100
101 # GYP version: WebKit/Source/web/web_tests.gyp:webkit_unit_tests
102 test("webkit_unit_tests") {
103   deps = [
104     ":test_support",
105     ":web",
106     "//base",
107     "//base/test:test_support",
108     "//base:i18n",
109     "//content/test:test_support",
110     "//testing/gmock",
111     "//testing/gtest",
112     "//third_party/WebKit/Source/wtf:test_support",
113     "//third_party/libwebp",
114     "//third_party/zlib",
115     "//url",
116     "//v8",
117   ]
118
119   sources = [ "tests/RunAllTests.cpp" ]
120
121   configs += [ "//third_party/WebKit/Source:config" ]
122
123   if (!is_component_build) {
124     deps += [ "//third_party/WebKit/Source/core" ]
125
126     configs += [ "//third_party/WebKit/Source:inside_blink" ]
127
128     sources += web_gypi.web_unittest_files
129     sources += bindings_unittest_files
130     sources += core_unittest_files
131     sources += modules_unittest_files
132     sources += platform_web_unittest_files
133   }
134 }