chromium/chromeos/constants/BUILD.gn

# Copyright 2021 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")

component("constants") {
  output_name = "chromeos_constants"
  defines = [ "IS_CHROMEOS_CONSTANTS_IMPL" ]
  sources = [
    "chromeos_features.cc",
    "chromeos_features.h",
    "chromeos_switches.cc",
    "chromeos_switches.h",
    "devicetype.cc",
    "devicetype.h",
    "pkcs11_definitions.h",
    "pref_names.h",
    "url_constants.h",
  ]
  deps = [
    "//base",
    "//build:chromeos_buildflags",
    "//chromeos/components/libsegmentation:buildflags",
  ]
  if (is_chromeos_lacros) {
    deps += [
      "//chromeos/crosapi/mojom",
      "//chromeos/startup",
    ]
  }
}

source_set("unit_tests") {
  testonly = true
  sources = [ "devicetype_unittest.cc" ]
  deps = [
    ":constants",
    "//base/test:test_support",
    "//build:chromeos_buildflags",
    "//chromeos/crosapi/mojom",
    "//testing/gtest",
  ]
  if (is_chromeos_lacros) {
    deps += [
      "//chromeos/lacros:lacros",
      "//chromeos/lacros:test_support",
      "//chromeos/startup",
    ]
  }
}