Roll src/third_party/WebKit 35143b2:56db356 (svn 201870:201871)
[chromium-blink-merge.git] / chromecast / base / BUILD.gn
blobc171c1bc7e705cd67d6a8adddd984a863d1f66ff
1 # Copyright 2015 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("//chrome/version.gni")  # TODO layering violation!
6 import("//chromecast/chromecast.gni")
7 import("//testing/test.gni")
9 source_set("base") {
10   sources = [
11     "android/dumpstate_writer.cc",
12     "android/dumpstate_writer.h",
13     "android/system_time_change_notifier_android.cc",
14     "android/system_time_change_notifier_android.h",
15     "cast_paths.cc",
16     "cast_paths.h",
17     "cast_resource.h",
18     "chromecast_switches.cc",
19     "chromecast_switches.h",
20     "error_codes.cc",
21     "error_codes.h",
22     "path_utils.cc",
23     "path_utils.h",
24     "pref_names.cc",
25     "pref_names.h",
26     "process_utils.cc",
27     "process_utils.h",
28     "serializers.cc",
29     "serializers.h",
30     "system_time_change_notifier.cc",
31     "system_time_change_notifier.h",
32     "task_runner_impl.cc",
33     "task_runner_impl.h",
34   ]
36   configs += [ "//chromecast:config" ]
38   public_deps = [
39     "//chromecast/base/metrics",
40     "//chromecast/public",
41   ]
43   deps = [
44     "//base",
45   ]
48 test("cast_base_unittests") {
49   sources = [
50     "error_codes_unittest.cc",
51     "path_utils_unittest.cc",
52     "process_utils_unittest.cc",
53     "serializers_unittest.cc",
54     "system_time_change_notifier_unittest.cc",
55   ]
57   deps = [
58     ":base",
59     "//base",
60     "//base/test:run_all_unittests",
61     "//base/test:test_support",
62     "//testing/gtest",
63   ]
66 source_set("cast_sys_info") {
67   sources = [
68     "cast_sys_info_dummy.cc",
69     "cast_sys_info_dummy.h",
70     "cast_sys_info_util.h",
71   ]
73   if (chromecast_branding == "public" && !is_android) {
74     sources += [ "cast_sys_info_util_simple.cc" ]
75   }
77   # TODO(mbjorge): put cast_sys_info_android in here
79   deps = [
80     "//base",
81     "//chromecast/public",
82   ]
85 process_version("cast_version") {
86   template_file = "version.h.in"
87   output = "$target_gen_dir/version.h"
88   extra_args = [
89     "-e",
90     "VERSION_FULL=\"%s.%s.%s.%s\"%(MAJOR,MINOR,BUILD,PATCH)",
92     # TODO(slan): Populate the fields below with real values
93     "-e",
94     "CAST_BUILD_INCREMENTAL=20150608.181153",
95     "-e",
96     "CAST_BUILD_RELEASE=1.15",
97     "-e",
98     "CAST_IS_DEBUG_BUILD=1",
99     "-e",
100     "CAST_PRODUCT_TYPE=0",
101   ]