Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: printing/BUILD.gn

Issue 1526033002: printing: Invoke cups-config from the sysroot if one is being used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | printing/printing.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ui.gni") 7 import("//build/config/ui.gni")
7 import("//testing/test.gni") 8 import("//testing/test.gni")
8 if (is_mac) { 9 if (is_mac) {
9 import("//build/config/mac/mac_sdk.gni") 10 import("//build/config/mac/mac_sdk.gni")
10 } 11 }
11 if (is_android) { 12 if (is_android) {
12 import("//build/config/android/rules.gni") 13 import("//build/config/android/rules.gni")
13 } 14 }
14 15
15 component("printing") { 16 component("printing") {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 "printing_context_no_system_dialog.cc", 122 "printing_context_no_system_dialog.cc",
122 "printing_context_no_system_dialog.h", 123 "printing_context_no_system_dialog.h",
123 ] 124 ]
124 } 125 }
125 126
126 if (use_cups) { 127 if (use_cups) {
127 configs += [ ":cups" ] 128 configs += [ ":cups" ]
128 129
129 if (is_linux) { 130 if (is_linux) {
130 cups_version = exec_script("cups_config_helper.py", 131 cups_version = exec_script("cups_config_helper.py",
131 [ "--api-version" ], 132 [
133 "--api-version",
134 sysroot,
135 ],
132 "trim string") 136 "trim string")
133 137
134 if (cups_version == "1.6" || cups_version == "1.7") { 138 if (cups_version == "1.6" || cups_version == "1.7") {
135 cflags += [ 139 cflags += [
136 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this 140 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
137 # API for now as supported Linux and Mac OS'es are still using 141 # API for now as supported Linux and Mac OS'es are still using
138 # older versions of CUPS. More info: crbug.com/226176 142 # older versions of CUPS. More info: crbug.com/226176
139 "-Wno-deprecated-declarations", 143 "-Wno-deprecated-declarations",
140 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section 144 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
141 # below. 145 # below.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 244 }
241 245
242 if (use_cups) { 246 if (use_cups) {
243 config("cups") { 247 config("cups") {
244 defines = [ "USE_CUPS" ] 248 defines = [ "USE_CUPS" ]
245 249
246 if (is_mac) { 250 if (is_mac) {
247 libs = [ "cups" ] 251 libs = [ "cups" ]
248 lib_dirs = [ "$mac_sdk_path/usr/lib" ] 252 lib_dirs = [ "$mac_sdk_path/usr/lib" ]
249 } else { 253 } else {
250 libs = exec_script("cups_config_helper.py", [ "--libs-for-gn" ], "value") 254 libs = exec_script("cups_config_helper.py",
255 [
256 "--libs-for-gn",
257 sysroot,
258 ],
259 "value")
251 } 260 }
252 } 261 }
253 } 262 }
254 263
255 if (is_android) { 264 if (is_android) {
256 # GYP: //printing/printing.gyp:printing_jni_headers 265 # GYP: //printing/printing.gyp:printing_jni_headers
257 generate_jni("printing_jni_headers") { 266 generate_jni("printing_jni_headers") {
258 sources = [ 267 sources = [
259 "android/java/src/org/chromium/printing/PrintingContext.java", 268 "android/java/src/org/chromium/printing/PrintingContext.java",
260 ] 269 ]
261 jni_package = "printing" 270 jni_package = "printing"
262 } 271 }
263 272
264 # GYP: //printing/printing.gyp:printing_java 273 # GYP: //printing/printing.gyp:printing_java
265 android_library("printing_java") { 274 android_library("printing_java") {
266 deps = [ 275 deps = [
267 "//base:base_java", 276 "//base:base_java",
268 ] 277 ]
269 DEPRECATED_java_in_dir = "android/java/src" 278 DEPRECATED_java_in_dir = "android/java/src"
270 } 279 }
271 } 280 }
OLDNEW
« no previous file with comments | « no previous file | printing/printing.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698