Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / utility / BUILD.gn
blobead790a1c6f7b75aa1f78f87e72d6034a3c3ae7c
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")
8 gypi_values = exec_script("//build/gypi_to_gn.py",
9                           [ rebase_path("../chrome_utility.gypi") ],
10                           "scope",
11                           [ "../chrome_utility.gypi" ])
13 static_library("utility") {
14   sources = rebase_path(gypi_values.chrome_utility_sources, ".", "..")
15   defines = []
17   public_deps = []
18   deps = [
19     "//base",
20     "//components/safe_json:safe_json_parser_message_filter",
21     "//components/search_engines",
22     "//components/strings",
23     "//components/url_fixer",
24     "//content/public/common",
25     "//content/public/utility",
26     "//media",
27     "//skia",
28     "//third_party/libxml",
29     "//chrome:resources",
30     "//chrome:strings",
31     "//chrome/common",
32   ]
34   if (!is_android) {
35     deps += [
36       "//chrome/common:mojo_bindings",
37       "//net:net_utility_services",
38     ]
39     sources +=
40         rebase_path(gypi_values.chrome_utility_importer_sources, ".", "..")
41   }
43   if (enable_extensions) {
44     deps += [
45       "//chrome/common/extensions/api",
46       "//extensions/utility",
47     ]
49     public_deps += [ "//chrome/common/extensions/api" ]
51     sources +=
52         rebase_path(gypi_values.chrome_utility_extensions_sources, ".", "..")
53     sources +=
54         rebase_path(gypi_values.chrome_utility_shared_media_sources, ".", "..")
56     # Prevent wininet from loading in the renderer. http://crbug.com/460679
57     if (is_win) {
58       ldflags = [ "/DELAYLOAD:wininet.dll" ]
59     }
61     if (is_win || is_mac) {
62       sources +=
63           rebase_path(gypi_values.chrome_utility_win_mac_media_gallery_sources,
64                       ".",
65                       "..")
66       deps += [ "//components/wifi" ]
67     } else {
68       sources += [ "image_writer/image_writer_stub.cc" ]
69     }
71     if (is_mac) {
72       sources +=
73           rebase_path(gypi_values.chrome_utility_mac_media_gallery_sources,
74                       ".",
75                       "..")
76     }
78     # Linux should use system libexif
79     if (!is_linux) {
80       # TODO(thestig): Properly support building on Linux and ChromeOS.
81       deps += [ "//third_party/libexif" ]
82     }
83   }
85   if (use_nss_certs) {
86     sources += [
87       "importer/nss_decryptor_system_nss.cc",
88       "importer/nss_decryptor_system_nss.h",
89     ]
90     deps += [
91       "//crypto",
92       "//crypto:platform",
93     ]
94   }
96   if (!enable_print_preview) {
97     sources -= [
98       "printing_handler.cc",
99       "printing_handler.h",
100     ]
101   }
103   if (!enable_mdns) {
104     sources -= [
105       "local_discovery/service_discovery_message_handler.cc",
106       "local_discovery/service_discovery_message_handler.h",
107     ]
108   }