Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / utility / BUILD.gn
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.
4
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7
8 gypi_values = exec_script(
9     "//build/gypi_to_gn.py",
10     [ rebase_path("../chrome_utility.gypi") ],
11     "scope",
12     [ "../chrome_utility.gypi" ])
13
14 static_library("utility") {
15   sources = rebase_path(gypi_values.chrome_utility_sources, ".", "..")
16   defines = []
17
18   deps = [
19     "//base",
20     "//components/strings",
21     "//components/url_fixer",
22     "//content/public/common",
23     "//content/public/utility",
24     "//media",
25     "//skia",
26     "//third_party/libxml",
27     "//chrome:resources",
28     "//chrome:strings",
29     "//chrome/common",
30   ]
31
32   if (!is_android) {
33     sources += rebase_path(gypi_values.chrome_utility_importer_sources,
34                            ".", "..")
35   }
36
37   if (enable_extensions == 1) {
38     deps += [
39       "//chrome/common/extensions/api",
40       #"//third_party/libexif",  TODO(GYP)
41     ]
42
43     forward_dependent_configs_from = [
44       "//chrome/common/extensions/api",
45     ]
46
47     sources += rebase_path(gypi_values.chrome_utility_extensions_sources,
48                            ".", "..")
49     sources += rebase_path(gypi_values.chrome_utility_shared_media_sources,
50                            ".", "..")
51
52     if (is_win || is_mac) {
53       sources += rebase_path(
54           gypi_values.chrome_utility_win_mac_media_gallery_sources, ".", "..")
55       deps += [ "//components/wifi" ]
56     } else {
57       sources += [ "image_writer/image_writer_stub.cc" ]
58     }
59
60     if (is_mac) {
61       sources += rebase_path(gypi_values.chrome_utility_mac_media_gallery_sources,
62                              ".", "..")
63     }
64   }
65
66   if (!use_openssl) {
67     sources -= [ "importer/nss_decryptor.cc" ]
68     if (!is_win && !is_mac) {
69       sources += [
70         "importer/nss_decryptor_system_nss.cc",
71         "importer/nss_decryptor_system_nss.h",
72       ]
73       deps += [
74         "//crypto",
75         "//crypto:platform",
76       ]
77     }
78   }
79
80   if (printing_mode != 1) {
81     sources -= [
82       "printing_handler.cc",
83       "printing_handler.h",
84     ]
85   }
86
87   if (!enable_mdns) {
88     sources -= [
89       "local_discovery/service_discovery_message_handler.cc",
90       "local_discovery/service_discovery_message_handler.h",
91     ]
92   }
93
94   if (safe_browsing_mode == 1) {
95     defines += [ "FULL_SAFE_BROWSING" ]
96   }
97 }