| # Copyright 2018 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/features.gni") |
| import("//printing/buildflags/buildflags.gni") |
| import("//services/service_manager/public/service_manifest.gni") |
| |
| enable_service = use_cups && is_chromeos |
| |
| source_set("lib") { |
| sources = [ |
| "cups_ipp_parser_service.cc", |
| "cups_ipp_parser_service.h", |
| "ipp_parser.h", |
| ] |
| |
| deps = [ |
| "//base", |
| "//mojo/public/cpp/bindings", |
| "//net", |
| ] |
| |
| public_deps = [ |
| "//mojo/public/mojom/base", |
| "//printing", |
| "//services/service_manager/public/cpp", |
| ] |
| |
| # We stub the implementation if libCUPS is not present |
| if (enable_service) { |
| configs += [ "//printing:cups" ] |
| sources += [ "ipp_parser.cc" ] |
| deps += [ |
| "//chrome/services/cups_ipp_parser/public/cpp", |
| "//chrome/services/cups_ipp_parser/public/mojom", |
| ] |
| } else { |
| sources += [ "fake_ipp_parser.cc" ] |
| } |
| } |
| |
| service_manifest("manifest") { |
| name = "cups_ipp_parser" |
| source = "manifest.json" |
| } |