Files.app: Dispatch 'drive-connection-changed' event on initialization of VolumeManag...
[chromium-blink-merge.git] / extensions / common / BUILD.gn
blob03e194c67ce0f0bd86a0ef8770f3466881168e45
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   # This must be a static library because extensions common depends on
30   # GetTrustedICAPublicKey in extensions/browser which isn't always linked
31   # in. TODO(brettw): This reverse dependency should be fixed.
32   static_library("common") {
33     sources = rebase_path(extensions_gypi_values.extensions_common_sources,
34                           ".",
35                           "//extensions")
37     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
38     configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
40     deps = [
41       ":common_constants",
42       ":mojo",
44       # TODO(benwells): figure out what to do with the api target and
45       # api resources compiled into the chrome resource bundle.
46       # http://crbug.com/162530
47       "//chrome:resources",
48       "//components/crx_file",
49       "//components/url_matcher",
50       "//content/public/common",
51       "//crypto",
52       "//device/bluetooth",
53       "//device/usb",
54       "//extensions/common/api",
55       "//extensions/strings",
56       "//extensions:extensions_resources",
57       "//ipc",
58       "//net",
59       "//third_party/icu",
60       "//third_party/libxml",
61       "//third_party/re2",
62       "//ui/base",
63       "//ui/gfx/geometry",
64       "//ui/gfx/ipc",
65       "//url",
66     ]
68     if (use_openssl) {
69       sources +=
70           rebase_path(extensions_gypi_values.extensions_common_sources_openssl,
71                       ".",
72                       "//extensions")
73       deps += [ "//third_party/boringssl" ]
74     } else {
75       sources += rebase_path(
76               extensions_gypi_values.extensions_common_sources_nonopenssl,
77               ".",
78               "//extensions")
79     }
81     if (enable_nacl) {
82       nacl_sources =
83           rebase_path(extensions_gypi_values.extensions_common_sources_nacl,
84                       ".",
85                       "//extensions")
86       sources += nacl_sources
87     }
88   }
89 }  # enable_extensions