| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/config/sysroot.gni") | 6 import("//build/config/sysroot.gni") |
| 7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
| 8 import("//testing/test.gni") | 8 import("//testing/test.gni") |
| 9 if (is_mac) { | 9 if (is_mac) { |
| 10 import("//build/config/mac/mac_sdk.gni") | 10 import("//build/config/mac/mac_sdk.gni") |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 sources += [ | 121 sources += [ |
| 122 "printing_context_no_system_dialog.cc", | 122 "printing_context_no_system_dialog.cc", |
| 123 "printing_context_no_system_dialog.h", | 123 "printing_context_no_system_dialog.h", |
| 124 ] | 124 ] |
| 125 } | 125 } |
| 126 | 126 |
| 127 if (use_cups) { | 127 if (use_cups) { |
| 128 configs += [ ":cups" ] | 128 configs += [ ":cups" ] |
| 129 | 129 |
| 130 if (is_linux) { | 130 if (is_linux) { |
| 131 # rebase_path does not accept an empty string |
| 132 if (use_sysroot) { |
| 133 cups_sysroot = rebase_path(sysroot) |
| 134 } else { |
| 135 cups_sysroot = "" |
| 136 } |
| 131 cups_version = exec_script("cups_config_helper.py", | 137 cups_version = exec_script("cups_config_helper.py", |
| 132 [ | 138 [ |
| 133 "--api-version", | 139 "--api-version", |
| 134 rebase_path(sysroot), | 140 cups_sysroot, |
| 135 ], | 141 ], |
| 136 "trim string") | 142 "trim string") |
| 137 | 143 |
| 138 if (cups_version == "1.6" || cups_version == "1.7") { | 144 if (cups_version == "1.6" || cups_version == "1.7") { |
| 139 cflags += [ | 145 cflags += [ |
| 140 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this | 146 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this |
| 141 # API for now as supported Linux and Mac OS'es are still using | 147 # API for now as supported Linux and Mac OS'es are still using |
| 142 # older versions of CUPS. More info: crbug.com/226176 | 148 # older versions of CUPS. More info: crbug.com/226176 |
| 143 "-Wno-deprecated-declarations", | 149 "-Wno-deprecated-declarations", |
| 144 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section | 150 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 } | 240 } |
| 235 | 241 |
| 236 if (use_cups) { | 242 if (use_cups) { |
| 237 config("cups") { | 243 config("cups") { |
| 238 defines = [ "USE_CUPS" ] | 244 defines = [ "USE_CUPS" ] |
| 239 | 245 |
| 240 if (is_mac) { | 246 if (is_mac) { |
| 241 libs = [ "cups" ] | 247 libs = [ "cups" ] |
| 242 lib_dirs = [ "$mac_sdk_path/usr/lib" ] | 248 lib_dirs = [ "$mac_sdk_path/usr/lib" ] |
| 243 } else { | 249 } else { |
| 250 # rebase_path does not accept an empty string |
| 251 if (use_sysroot) { |
| 252 cups_sysroot = rebase_path(sysroot) |
| 253 } else { |
| 254 cups_sysroot = "" |
| 255 } |
| 244 libs = exec_script("cups_config_helper.py", | 256 libs = exec_script("cups_config_helper.py", |
| 245 [ | 257 [ |
| 246 "--libs-for-gn", | 258 "--libs-for-gn", |
| 247 rebase_path(sysroot), | 259 cups_sysroot, |
| 248 ], | 260 ], |
| 249 "value") | 261 "value") |
| 250 } | 262 } |
| 251 } | 263 } |
| 252 } | 264 } |
| 253 | 265 |
| 254 if (is_android) { | 266 if (is_android) { |
| 255 # GYP: //printing/printing.gyp:printing_jni_headers | 267 # GYP: //printing/printing.gyp:printing_jni_headers |
| 256 generate_jni("printing_jni_headers") { | 268 generate_jni("printing_jni_headers") { |
| 257 sources = [ | 269 sources = [ |
| 258 "android/java/src/org/chromium/printing/PrintingContext.java", | 270 "android/java/src/org/chromium/printing/PrintingContext.java", |
| 259 ] | 271 ] |
| 260 jni_package = "printing" | 272 jni_package = "printing" |
| 261 } | 273 } |
| 262 | 274 |
| 263 # GYP: //printing/printing.gyp:printing_java | 275 # GYP: //printing/printing.gyp:printing_java |
| 264 android_library("printing_java") { | 276 android_library("printing_java") { |
| 265 deps = [ | 277 deps = [ |
| 266 "//base:base_java", | 278 "//base:base_java", |
| 267 ] | 279 ] |
| 268 DEPRECATED_java_in_dir = "android/java/src" | 280 DEPRECATED_java_in_dir = "android/java/src" |
| 269 } | 281 } |
| 270 } | 282 } |
| OLD | NEW |