summaryrefslogtreecommitdiffstats
path: root/extensions/common/BUILD.gn
blob: faa1cb88eb619068cb4e6ab791ef72051211b5fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//extensions/extensions.gni")
import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")

# GYP version: extensions/extensions.gyp:extensions_common_constants
source_set("common_constants") {
  sources =
      rebase_path(extensions_gypi_values.extensions_common_constants_sources,
                  ".",
                  "//extensions")

  if (is_win) {
    cflags = [ "/wd4267" ]  # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
  }
}

if (enable_extensions) {
  mojom("mojo") {
    sources = rebase_path(extensions_gypi_values.extensions_common_mojo_sources,
                          ".",
                          "//extensions")
  }

  # GYP version: extensions/extensions.gyp:extensions_common
  source_set("common") {
    sources = rebase_path(extensions_gypi_values.extensions_common_sources,
                          ".",
                          "//extensions")

    deps = [
      ":common_constants",
      ":mojo",

      # TODO(benwells): figure out what to do with the api target and
      # api resources compiled into the chrome resource bundle.
      # http://crbug.com/162530
      "//chrome:resources",
      "//components/crx_file",
      "//components/url_matcher",
      "//content/public/common",
      "//crypto",
      "//device/bluetooth",
      "//device/usb",
      "//extensions/common/api",
      "//extensions/strings",
      "//extensions:extensions_resources",
      "//ipc",
      "//net",
      "//third_party/icu",
      "//third_party/libxml",
      "//third_party/re2",
      "//ui/base",
      "//ui/gfx/geometry",
      "//ui/gfx/ipc",
      "//url",
    ]

    if (use_openssl) {
      ssl_sources =
          rebase_path(extensions_gypi_values.extensions_common_sources_openssl,
                      ".",
                      "//extensions")
      sources += ssl_sources
    } else {
      nonssl_sources = rebase_path(
              extensions_gypi_values.extensions_common_sources_nonopenssl,
              ".",
              "//extensions")
      sources += nonssl_sources
    }

    if (enable_nacl) {
      nacl_sources =
          rebase_path(extensions_gypi_values.extensions_common_sources_nacl,
                      ".",
                      "//extensions")
      sources += nacl_sources
    }

    if (is_win) {
      cflags = [ "/wd4267" ]  # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
    }
  }
}  # enable_extensions