[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 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 | |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 8 | gypi_values = exec_script("//build/gypi_to_gn.py", |
| 9 | [ rebase_path("../chrome_utility.gypi") ], |
| 10 | "scope", |
| 11 | [ "../chrome_utility.gypi" ]) |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 12 | |
| 13 | static_library("utility") { |
| 14 | sources = rebase_path(gypi_values.chrome_utility_sources, ".", "..") |
[email protected] | 1e8205e8 | 2014-07-08 10:54:24 | [diff] [blame] | 15 | defines = [] |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 16 | |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 17 | public_deps = [] |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 18 | deps = [ |
| 19 | "//base", |
[email protected] | 0e256aa | 2014-07-24 23:10:53 | [diff] [blame] | 20 | "//components/strings", |
| 21 | "//components/url_fixer", |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 22 | "//content/public/common", |
| 23 | "//content/public/utility", |
[email protected] | 0e256aa | 2014-07-24 23:10:53 | [diff] [blame] | 24 | "//media", |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 25 | "//skia", |
| 26 | "//third_party/libxml", |
| 27 | "//chrome:resources", |
| 28 | "//chrome:strings", |
| 29 | "//chrome/common", |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 30 | ] |
| 31 | |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 32 | if (!is_android) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 33 | sources += |
| 34 | rebase_path(gypi_values.chrome_utility_importer_sources, ".", "..") |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 35 | } |
| 36 | |
Brett Wilson | 64275214 | 2014-08-26 19:05:21 | [diff] [blame] | 37 | if (enable_extensions) { |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 38 | deps += [ |
| 39 | "//chrome/common/extensions/api", |
rockot | 3813023 | 2014-11-06 18:50:01 | [diff] [blame] | 40 | "//extensions/utility", |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 41 | |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 42 | #"//third_party/libexif", TODO(GYP) |
| 43 | ] |
| 44 | |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 45 | public_deps += [ "//chrome/common/extensions/api" ] |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 46 | |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 47 | sources += |
| 48 | rebase_path(gypi_values.chrome_utility_extensions_sources, ".", "..") |
| 49 | sources += |
| 50 | rebase_path(gypi_values.chrome_utility_shared_media_sources, ".", "..") |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 51 | |
| 52 | if (is_win || is_mac) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 53 | sources += |
| 54 | rebase_path(gypi_values.chrome_utility_win_mac_media_gallery_sources, |
| 55 | ".", |
| 56 | "..") |
[email protected] | 0e256aa | 2014-07-24 23:10:53 | [diff] [blame] | 57 | deps += [ "//components/wifi" ] |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 58 | } else { |
| 59 | sources += [ "image_writer/image_writer_stub.cc" ] |
| 60 | } |
| 61 | |
| 62 | if (is_mac) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 63 | sources += |
| 64 | rebase_path(gypi_values.chrome_utility_mac_media_gallery_sources, |
| 65 | ".", |
| 66 | "..") |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 67 | } |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 68 | } |
| 69 | |
Brett Wilson | 64275214 | 2014-08-26 19:05:21 | [diff] [blame] | 70 | if (use_openssl) { |
James Robinson | 2ed4d69 | 2014-09-17 05:20:58 | [diff] [blame] | 71 | if (!is_win && !is_mac && !is_android) { |
Brett Wilson | 64275214 | 2014-08-26 19:05:21 | [diff] [blame] | 72 | sources -= [ "importer/nss_decryptor.cc" ] |
| 73 | } |
| 74 | } else { # !use_openssl |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 75 | if (!is_win && !is_mac) { |
| 76 | sources += [ |
| 77 | "importer/nss_decryptor_system_nss.cc", |
| 78 | "importer/nss_decryptor_system_nss.h", |
| 79 | ] |
| 80 | deps += [ |
| 81 | "//crypto", |
| 82 | "//crypto:platform", |
| 83 | ] |
| 84 | } |
| 85 | } |
| 86 | |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 87 | if (!enable_print_preview) { |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 88 | sources -= [ |
| 89 | "printing_handler.cc", |
| 90 | "printing_handler.h", |
| 91 | ] |
| 92 | } |
| 93 | |
| 94 | if (!enable_mdns) { |
| 95 | sources -= [ |
| 96 | "local_discovery/service_discovery_message_handler.cc", |
| 97 | "local_discovery/service_discovery_message_handler.h", |
| 98 | ] |
| 99 | } |
[email protected] | 1e8205e8 | 2014-07-08 10:54:24 | [diff] [blame] | 100 | |
| 101 | if (safe_browsing_mode == 1) { |
| 102 | defines += [ "FULL_SAFE_BROWSING" ] |
| 103 | } |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 104 | } |