summaryrefslogtreecommitdiffstats
path: root/chrome/utility/BUILD.gn
blob: 76c73df7ef57cee522d641880fb716225b99fc54 (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
90
91
92
# 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")

gypi_values = exec_script(
    "//build/gypi_to_gn.py",
    [ rebase_path("../chrome_utility.gypi") ],
    "scope",
    [ "../chrome_utility.gypi" ])

static_library("utility") {
  sources = rebase_path(gypi_values.chrome_utility_sources, ".", "..")

  deps = [
    "//base",
    #"../components/components_strings.gyp:components_strings",  TODO(GYP)
    #"../components/components.gyp:url_fixer",  TODO(GYP)
    "//content/public/common",
    "//content/public/utility",
    #"../media/media.gyp:media",  TODO(GYP)
    "//skia",
    "//third_party/libxml",
    "//chrome:resources",
    "//chrome:strings",
    "//chrome/common",
  ]

  if (!is_android) {
    sources += rebase_path(gypi_values.chrome_utility_importer_sources,
                           ".", "..")
  }

  if (enable_extensions == 1) {
    deps += [
      "//chrome/common/extensions/api",
      #"//third_party/libexif",  TODO(GYP)
    ]

    forward_dependent_configs_from = [
      "//chrome/common/extensions/api",
    ]

    sources += rebase_path(gypi_values.chrome_utility_extensions_sources,
                           ".", "..")
    sources += rebase_path(gypi_values.chrome_utility_shared_media_sources,
                           ".", "..")

    if (is_win || is_mac) {
      sources += rebase_path(
          gypi_values.chrome_utility_win_mac_media_gallery_sources, ".", "..")
      #deps += [ "//components/wifi" ]  TODO(GYP)
    } else {
      sources += [ "image_writer/image_writer_stub.cc" ]
    }

    if (is_mac) {
      sources += rebase_path(gypi_values.chrome_utility_mac_media_gallery_sources,
                             ".", "..")
    }
  }

  if (!use_openssl) {
    sources -= [ "importer/nss_decryptor.cc" ]
    if (!is_win && !is_mac) {
      sources += [
        "importer/nss_decryptor_system_nss.cc",
        "importer/nss_decryptor_system_nss.h",
      ]
      deps += [
        "//crypto",
        "//crypto:platform",
      ]
    }
  }

  if (enable_printing != 1) {
    sources -= [
      "printing_handler.cc",
      "printing_handler.h",
    ]
  }

  if (!enable_mdns) {
    sources -= [
      "local_discovery/service_discovery_message_handler.cc",
      "local_discovery/service_discovery_message_handler.h",
    ]
  }
}