Adding Peter Thatcher to the owners file.
[chromium-blink-merge.git] / extensions / common / BUILD.gn
blob1718727556168b1caeaae43d67465e7d0ae147df
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/crypto.gni")
6 import("//build/config/features.gni")
7 import("//extensions/extensions.gni")
8 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
10 # GYP version: extensions/extensions.gyp:extensions_common_constants
11 source_set("common_constants") {
12   sources =
13       rebase_path(extensions_gypi_values.extensions_common_constants_sources,
14                   ".",
15                   "//extensions")
17   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
18   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
21 if (enable_extensions) {
22   mojom("mojo") {
23     sources = rebase_path(extensions_gypi_values.extensions_common_mojo_sources,
24                           ".",
25                           "//extensions")
26   }
28   # GYP version: extensions/extensions.gyp:extensions_common
29   source_set("common") {
30     sources = rebase_path(extensions_gypi_values.extensions_common_sources,
31                           ".",
32                           "//extensions")
34     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
35     configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
37     deps = [
38       ":common_constants",
39       ":mojo",
41       # TODO(benwells): figure out what to do with the api target and
42       # api resources compiled into the chrome resource bundle.
43       # http://crbug.com/162530
44       "//chrome:resources",
45       "//components/crx_file",
46       "//components/url_matcher",
47       "//content/public/common",
48       "//crypto",
49       "//device/bluetooth",
50       "//device/usb",
51       "//extensions/common/api",
52       "//extensions/strings",
53       "//extensions:extensions_resources",
54       "//ipc",
55       "//net",
56       "//third_party/icu",
57       "//third_party/libxml",
58       "//third_party/re2",
59       "//ui/base",
60       "//ui/gfx/geometry",
61       "//ui/gfx/ipc",
62       "//url",
63     ]
65     if (use_openssl) {
66       ssl_sources =
67           rebase_path(extensions_gypi_values.extensions_common_sources_openssl,
68                       ".",
69                       "//extensions")
70       sources += ssl_sources
71     } else {
72       nonssl_sources = rebase_path(
73               extensions_gypi_values.extensions_common_sources_nonopenssl,
74               ".",
75               "//extensions")
76       sources += nonssl_sources
77     }
79     if (enable_nacl) {
80       nacl_sources =
81           rebase_path(extensions_gypi_values.extensions_common_sources_nacl,
82                       ".",
83                       "//extensions")
84       sources += nacl_sources
85     }
86   }
87 }  # enable_extensions