Upstream version 10.39.225.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   public_deps = []
19   deps = [
20     "//base",
21     "//components/strings",
22     "//components/url_fixer",
23     "//content/public/common",
24     "//content/public/utility",
25     "//media",
26     "//skia",
27     "//third_party/libxml",
28     "//chrome:resources",
29     "//chrome:strings",
30     "//chrome/common",
31   ]
32
33   if (!is_android) {
34     sources += rebase_path(gypi_values.chrome_utility_importer_sources,
35                            ".", "..")
36   }
37
38   if (enable_extensions) {
39     deps += [
40       "//chrome/common/extensions/api",
41       #"//third_party/libexif",  TODO(GYP)
42     ]
43
44     public_deps += [
45       "//chrome/common/extensions/api",
46     ]
47
48     sources += rebase_path(gypi_values.chrome_utility_extensions_sources,
49                            ".", "..")
50     sources += rebase_path(gypi_values.chrome_utility_shared_media_sources,
51                            ".", "..")
52
53     if (is_win || is_mac) {
54       sources += rebase_path(
55           gypi_values.chrome_utility_win_mac_media_gallery_sources, ".", "..")
56       deps += [ "//components/wifi" ]
57     } else {
58       sources += [ "image_writer/image_writer_stub.cc" ]
59     }
60
61     if (is_mac) {
62       sources += rebase_path(gypi_values.chrome_utility_mac_media_gallery_sources,
63                              ".", "..")
64     }
65   }
66
67   if (use_openssl) {
68     if (!is_win && !is_mac && !is_android) {
69       sources -= [ "importer/nss_decryptor.cc" ]
70     }
71   } else {  # !use_openssl
72     if (!is_win && !is_mac) {
73       sources += [
74         "importer/nss_decryptor_system_nss.cc",
75         "importer/nss_decryptor_system_nss.h",
76       ]
77       deps += [
78         "//crypto",
79         "//crypto:platform",
80       ]
81     }
82   }
83
84   if (printing_mode != 1) {
85     sources -= [
86       "printing_handler.cc",
87       "printing_handler.h",
88     ]
89   }
90
91   if (!enable_mdns) {
92     sources -= [
93       "local_discovery/service_discovery_message_handler.cc",
94       "local_discovery/service_discovery_message_handler.h",
95     ]
96   }
97
98   if (safe_browsing_mode == 1) {
99     defines += [ "FULL_SAFE_BROWSING" ]
100   }
101 }