Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / extensions / common / BUILD.gn
blobc76d9b1bbcafa48d62c74a1a7db0379857269632
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     configs += [
38       "//build/config:precompiled_headers",
40       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
41       "//build/config/compiler:no_size_t_to_int_warning",
42     ]
44     deps = [
45       ":common_constants",
46       ":mojo",
48       # TODO(benwells): figure out what to do with the api target and
49       # api resources compiled into the chrome resource bundle.
50       # http://crbug.com/162530
51       "//chrome:resources",
52       "//components/crx_file",
53       "//components/url_matcher",
54       "//content/public/common",
55       "//crypto",
56       "//device/bluetooth",
57       "//device/usb",
58       "//extensions/common/api",
59       "//extensions/strings",
60       "//extensions:extensions_resources",
61       "//ipc",
62       "//net",
63       "//third_party/icu",
64       "//third_party/libxml",
65       "//third_party/re2",
66       "//ui/base",
67       "//ui/gfx/geometry",
68       "//ui/gfx/ipc",
69       "//url",
70     ]
72     if (use_openssl) {
73       sources +=
74           rebase_path(extensions_gypi_values.extensions_common_sources_openssl,
75                       ".",
76                       "//extensions")
77       deps += [ "//third_party/boringssl" ]
78     } else {
79       sources += rebase_path(
80               extensions_gypi_values.extensions_common_sources_nonopenssl,
81               ".",
82               "//extensions")
83     }
85     if (enable_nacl) {
86       nacl_sources =
87           rebase_path(extensions_gypi_values.extensions_common_sources_nacl,
88                       ".",
89                       "//extensions")
90       sources += nacl_sources
91     }
92   }
93 }  # enable_extensions