Roll src/third_party/skia 9cdcabe:4b5472b
[chromium-blink-merge.git] / mojo / common / BUILD.gn
blob6dfed2fd3562afbbb9cf17f3cd6021615d77b613
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("//testing/test.gni")
7 group("common") {
8   deps = [
9     ":common_base",
10     ":url_type_converters",
11   ]
14 # GYP version: mojo/mojo_base.gyp:mojo_common_lib
15 component("common_base") {
16   output_name = "mojo_common_lib"
18   sources = [
19     "common_type_converters.cc",
20     "common_type_converters.h",
21     "data_pipe_file_utils.cc",
22     "data_pipe_utils.cc",
23     "data_pipe_utils.h",
24     "user_agent.cc",
25     "user_agent.h",
26     "weak_binding_set.h",
27     "weak_interface_ptr_set.h",
28   ]
30   defines = [ "MOJO_COMMON_IMPLEMENTATION" ]
32   deps = [
33     "//base",
34     "//base/third_party/dynamic_annotations",
35     "//mojo/environment:chromium",
36     "//third_party/mojo/src/mojo/public/c/system:for_component",
37     "//third_party/mojo/src/mojo/public/cpp/bindings",
38     "//third_party/mojo/src/mojo/public/cpp/environment",
39     "//third_party/mojo/src/mojo/public/cpp/system",
40   ]
43 # GYP version: mojo/mojo_base.gyp:mojo_url_type_converters
44 source_set("url_type_converters") {
45   sources = [
46     "url_type_converters.cc",
47     "url_type_converters.h",
48   ]
50   include_dirs = [ "//third_party/mojo/src/" ]
52   deps = [
53     ":common_base",
54     "//base",
55     "//base/third_party/dynamic_annotations",
56     "//third_party/mojo/src/mojo/public/cpp/bindings",
57     "//url",
58   ]
61 # TODO(GYP): Delete this after we've converted everything to GN.
62 # The _run targets exist only for compatibility w/ GYP.
63 group("mojo_common_unittests_run") {
64   testonly = true
65   deps = [
66     ":mojo_common_unittests",
67   ]
70 # GYP version: mojo/mojo_base.gyp:mojo_common_unittests
71 test("mojo_common_unittests") {
72   deps = [
73     ":common",
74     "//base",
75     "//base:message_loop_tests",
76     "//base/test:test_support",
77     "//mojo/environment:chromium",
78     "//mojo/message_pump",
79     "//testing/gtest",
80     "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
81     "//third_party/mojo/src/mojo/edk/test:test_support",
82     "//third_party/mojo/src/mojo/public/cpp/bindings",
83     "//third_party/mojo/src/mojo/public/cpp/test_support:test_utils",
84     "//url",
85   ]
87   sources = [
88     # The message_pump tests are so small and some what related to this code
89     # that we put them here.
90     "../message_pump/handle_watcher_unittest.cc",
91     "../message_pump/message_pump_mojo_unittest.cc",
92     "common_type_converters_unittest.cc",
93   ]
96 if (!is_component_build) {
97   source_set("tracing_impl") {
98     sources = [
99       "trace_controller_impl.cc",
100       "trace_controller_impl.h",
101       "tracing_impl.cc",
102       "tracing_impl.h",
103     ]
105     deps = [
106       "//base",
107       "//mojo/application/public/cpp",
108       "//mojo/services/tracing:bindings",
109       "//third_party/mojo/src/mojo/public/cpp/bindings",
110     ]
111   }