chromium/chrome/services/ipp_parser/BUILD.gn

# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
import("//printing/buildflags/buildflags.gni")

enable_service = use_cups && is_chromeos_ash

source_set("ipp_parser") {
  sources = [ "ipp_parser.h" ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  deps = [
    "//base",
    "//net",
  ]

  public_deps = [
    "//chrome/services/ipp_parser/public/mojom",
    "//mojo/public/mojom/base",
  ]

  # We stub the implementation if libCUPS is not present.
  if (enable_service) {
    configs += [ "//printing:cups" ]
    sources += [ "ipp_parser.cc" ]
    deps += [
      "//chrome/services/cups_proxy/public/cpp",
      "//chrome/services/ipp_parser/public/cpp",
    ]
  } else {
    sources += [ "fake_ipp_parser.cc" ]
  }
}