Commit 7afc0af6 authored by Daniel Hosseinian's avatar Daniel Hosseinian Committed by Commit Bot

Use build arg for CUPS IPP files in printing/BUILD.gn

Bug: 226176
Change-Id: Ie9d4cf97a2f0d977fb9955b5e7ab33516e0cbf02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2131217Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756157}
parent 2b1b0cc6
...@@ -31,13 +31,19 @@ if ((enable_basic_printing && is_win) || enable_print_preview) { ...@@ -31,13 +31,19 @@ if ((enable_basic_printing && is_win) || enable_print_preview) {
"set enable_pdf=true.") "set enable_pdf=true.")
} }
# Enable the CUPS IPP printing backend.
# TODO(crbug.com/226176): Remove this after CUPS PPD API calls are removed.
declare_args() {
use_cups_ipp = use_cups && !is_desktop_linux
}
# Several targets want to include this header file. We separate it out # Several targets want to include this header file. We separate it out
# here so multiple targets can depend on it. # here so multiple targets can depend on it.
source_set("printing_export") { source_set("printing_export") {
sources = [ "printing_export.h" ] sources = [ "printing_export.h" ]
} }
if (use_cups && is_chromeos) { if (use_cups_ipp && is_chromeos) {
ipp_handler_map_path = "$target_gen_dir/backend/ipp_handler_map.cc" ipp_handler_map_path = "$target_gen_dir/backend/ipp_handler_map.cc"
ipp_code_generate("ipp_handlers_generate") { ipp_code_generate("ipp_handlers_generate") {
...@@ -217,7 +223,7 @@ component("printing") { ...@@ -217,7 +223,7 @@ component("printing") {
# of the print backend and enables a custom implementation instead. # of the print backend and enables a custom implementation instead.
defines += [ "PRINT_BACKEND_AVAILABLE" ] defines += [ "PRINT_BACKEND_AVAILABLE" ]
if (is_chromeos || is_mac) { if (use_cups_ipp) {
sources += [ sources += [
"backend/cups_connection.cc", "backend/cups_connection.cc",
"backend/cups_connection.h", "backend/cups_connection.h",
...@@ -271,7 +277,7 @@ component("printing") { ...@@ -271,7 +277,7 @@ component("printing") {
} }
} }
if (is_chromeos || is_mac) { if (use_cups_ipp || is_chromeos) {
sources += [ sources += [
"printer_query_result.h", "printer_query_result.h",
"printer_status.cc", "printer_status.cc",
...@@ -370,7 +376,7 @@ test("printing_unittests") { ...@@ -370,7 +376,7 @@ test("printing_unittests") {
if (use_cups) { if (use_cups) {
configs += [ ":cups" ] configs += [ ":cups" ]
if (is_chromeos || is_mac) { if (use_cups_ipp) {
sources += [ "backend/cups_ipp_helper_unittest.cc" ] sources += [ "backend/cups_ipp_helper_unittest.cc" ]
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment