Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ui / snapshot / 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
7 component("snapshot") {
8   sources = [
9     "snapshot.h",
10     "snapshot_android.cc",
11     "snapshot_async.cc",
12     "snapshot_async.h",
13     "snapshot_aura.cc",
14     "snapshot_export.h",
15     "snapshot_ios.mm",
16     "snapshot_mac.mm",
17   ]
18
19   defines = [ "SNAPSHOT_IMPLEMENTATION" ]
20
21   deps = [
22     "//base",
23     "//skia",
24     "//ui/base",
25     "//ui/gfx",
26     "//ui/gfx/geometry",
27   ]
28
29   if (use_aura || is_android) {
30     deps += [
31       "//cc",
32       "//gpu/command_buffer/common",
33     ]
34   } else {
35     sources -= [
36       "snapshot_async.cc",
37       "snapshot_async.h",
38     ]
39   }
40
41   if (use_aura) {
42     deps += [
43       "//ui/aura",
44       "//ui/compositor",
45     ]
46   } else {
47     sources -= [
48       "snapshot_aura.cc"
49     ]
50   }
51 }
52
53 test("snapshot_unittests") {
54   sources = [
55     "snapshot_aura_unittest.cc",
56     "snapshot_mac_unittest.mm",
57     "test/run_all_unittests.cc",
58   ]
59
60   deps = [
61     ":snapshot",
62     "//base",
63     "//base/allocator",
64     "//base/test:test_support",
65     "//skia",
66     "//testing/gtest",
67     "//ui/base",
68     "//ui/gfx",
69     "//ui/gfx/geometry",
70     "//ui/gl",
71   ]
72
73   if (use_aura) {
74     deps += [
75       "//ui/aura:test_support",
76       "//ui/compositor",
77       "//ui/compositor:test_support",
78       "//ui/wm",
79     ]
80   } else {
81     sources -= [ "snapshot_aura_unittest.cc" ]
82   }
83 }