Update V8 to version 4.2.42 (based on 52d4d7de2e2c0874dad7a02943481ea374bc3958).
[chromium-blink-merge.git] / chromeos / BUILD.gn
blob947c0e735ab7ea43b1f76a557a0437c7aacc3b37
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.
5 import("//build/config/allocator.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
8 import("//third_party/protobuf/proto_library.gni")
10 assert(is_chromeos, "Non-ChromeOS builds must not depend on //chromeos")
12 gypi_values = exec_script("//build/gypi_to_gn.py",
13                           [ rebase_path("chromeos.gyp") ],
14                           "scope",
15                           [ "chromeos.gyp" ])
17 component("chromeos") {
18   configs += [ "//net/third_party/nss/ssl:ssl_config" ]
19   public_deps = [
20     "//dbus",
21   ]
22   deps = [
23     "//base",
24     "//base:i18n",
25     "//base:prefs",
26     "//base/third_party/dynamic_annotations",
27     "//chromeos/ime:gencode",
28     "//components/policy/proto",
29     "//components/onc",
30     "//crypto",
31     "//crypto:platform",
32     "//google_apis",
33     "//net/third_party/nss/ssl:libssl",
34     "//third_party/icu",
35     "//third_party/libxml",
36     "//third_party/protobuf:protobuf_lite",
37     "//ui/accelerometer",
38     "//ui/gfx/geometry",
39     "//url",
40     ":cryptohome_proto",
41     ":power_manager_proto",
42   ]
43   sources = gypi_values.chromeos_sources
44   defines = [ "CHROMEOS_IMPLEMENTATION" ]
47 static_library("test_support") {
48   testonly = true
49   configs += [ "//build/config/linux:dbus" ]
50   deps = [
51     "//testing/gmock",
52     ":chromeos",
53     ":cryptohome_proto",
54     ":power_manager_proto",
55     ":test_support_without_gmock",
56   ]
57   sources = [
58     "attestation/mock_attestation_flow.cc",
59     "attestation/mock_attestation_flow.h",
60     "chromeos_test_utils.cc",
61     "chromeos_test_utils.h",
62     "cryptohome/mock_async_method_caller.cc",
63     "cryptohome/mock_async_method_caller.h",
64     "cryptohome/mock_homedir_methods.cc",
65     "cryptohome/mock_homedir_methods.h",
66     "dbus/mock_cryptohome_client.cc",
67     "dbus/mock_cryptohome_client.h",
68     "dbus/mock_lorgnette_manager_client.cc",
69     "dbus/mock_lorgnette_manager_client.h",
70     "dbus/mock_session_manager_client.cc",
71     "dbus/mock_session_manager_client.h",
72     "dbus/mock_shill_manager_client.cc",
73     "dbus/mock_shill_manager_client.h",
74     "dbus/mock_shill_profile_client.cc",
75     "dbus/mock_shill_profile_client.h",
76     "dbus/mock_shill_service_client.cc",
77     "dbus/mock_shill_service_client.h",
78     "dbus/services/service_provider_test_helper.cc",
79     "dbus/services/service_provider_test_helper.h",
80     "disks/mock_disk_mount_manager.cc",
81     "disks/mock_disk_mount_manager.h",
82     "login/auth/fake_extended_authenticator.cc",
83     "login/auth/fake_extended_authenticator.h",
84     "login/auth/mock_auth_attempt_state_resolver.cc",
85     "login/auth/mock_auth_attempt_state_resolver.h",
86     "login/auth/mock_auth_status_consumer.cc",
87     "login/auth/mock_auth_status_consumer.h",
88     "login/auth/mock_authenticator.cc",
89     "login/auth/mock_authenticator.h",
90     "login/auth/mock_url_fetchers.cc",
91     "login/auth/mock_url_fetchers.h",
92     "network/fake_network_device_handler.cc",
93     "network/fake_network_device_handler.h",
94     "network/mock_managed_network_configuration_handler.cc",
95     "network/mock_managed_network_configuration_handler.h",
96     "network/onc/onc_test_utils.cc",
97     "network/onc/onc_test_utils.h",
98     "system/fake_statistics_provider.cc",
99     "system/fake_statistics_provider.h",
100   ]
103 static_library("test_support_without_gmock") {
104   testonly = true
105   configs += [ "//build/config/linux:dbus" ]
106   deps = [
107     "//crypto",
108     ":chromeos",
109     ":cryptohome_proto",
110     ":power_manager_proto",
111   ]
112   sources = [
113     "dbus/fake_cros_disks_client.cc",
114     "dbus/fake_cros_disks_client.h",
115     "dbus/fake_power_manager_client.cc",
116     "dbus/fake_power_manager_client.h",
117     "dbus/fake_session_manager_client.cc",
118     "dbus/fake_session_manager_client.h",
119     "dbus/fake_shill_manager_client.cc",
120     "dbus/fake_shill_manager_client.h",
121     "dbus/fake_update_engine_client.cc",
122     "dbus/fake_update_engine_client.h",
123   ]
126 test("chromeos_unittests") {
127   configs += [
128     "//build/config/linux:dbus",
129     "//net/third_party/nss/ssl:ssl_config",
130   ]
131   deps = [
132     "//base:prefs_test_support",
133     "//base/test:run_all_unittests",
134     "//base/test:test_support",
135     "//components/onc",
136     "//crypto",
137     "//crypto:test_support",
138     "//dbus:test_support",
139     "//google_apis",
140     "//net",
141     "//net:test_support",
142     "//testing/gmock",
143     "//testing/gtest",
144     "//url",
145     ":cryptohome_proto",
146     ":power_manager_proto",
147     ":test_support",
148   ]
149   sources = gypi_values.chromeos_test_sources
150   if (use_allocator != "none") {
151     deps += [ "//base/allocator" ]
152   }
155 proto_library("power_manager_proto") {
156   sources = [
157     "//third_party/cros_system_api/dbus/power_manager/input_event.proto",
158     "//third_party/cros_system_api/dbus/power_manager/peripheral_battery_status.proto",
159     "//third_party/cros_system_api/dbus/power_manager/policy.proto",
160     "//third_party/cros_system_api/dbus/power_manager/power_supply_properties.proto",
161     "//third_party/cros_system_api/dbus/power_manager/suspend.proto",
162   ]
164   proto_out_dir = "chromeos/dbus/power_manager"
167 proto_library("cryptohome_proto") {
168   sources = [
169     "//third_party/cros_system_api/dbus/cryptohome/key.proto",
170     "//third_party/cros_system_api/dbus/cryptohome/rpc.proto",
171   ]
173   proto_out_dir = "chromeos/dbus/cryptohome"
176 proto_library("cryptohome_signkey_proto") {
177   sources = [
178     "//third_party/cros_system_api/dbus/cryptohome/signed_secret.proto",
179   ]
181   proto_out_dir = "chromeos/cryptohome"