summaryrefslogtreecommitdiff
path: root/chromium/components/services/font/BUILD.gn
blob: b065131e035235637f102ee7352bf66c158cd798 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 2015 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("//ppapi/buildflags/buildflags.gni")
import("//testing/test.gni")

source_set("lib") {
  sources = [
    "font_service_app.cc",
    "font_service_app.h",
    "fontconfig_matching.cc",
    "fontconfig_matching.h",
  ]

  deps = [
    "//base",
    "//components/services/font/public/mojom",
    "//mojo/public/cpp/bindings",
    "//mojo/public/cpp/system",
    "//ppapi/buildflags:buildflags",
    "//third_party/fontconfig",
    "//ui/gfx",
  ]

  public_deps = [ "//skia" ]

  if ((is_linux || is_chromeos) && enable_plugins) {
    deps += [ ":ppapi_fontconfig_matching" ]
  }
}

if ((is_linux || is_chromeos) && enable_plugins) {
  source_set("ppapi_fontconfig_matching") {
    sources = [
      "ppapi_fontconfig_matching.cc",
      "ppapi_fontconfig_matching.h",
    ]

    deps = [
      "//base:base",
      "//ppapi/buildflags:buildflags",
      "//ppapi/c",
    ]
  }
}

test("font_service_unittests") {
  sources = [ "font_loader_unittest.cc" ]

  deps = [
    ":lib",
    "//base",
    "//base/test:test_support",
    "//components/services/font/public/cpp",
    "//components/services/font/public/mojom",
    "//mojo/core/test:run_all_unittests",
    "//mojo/public/cpp/bindings",
    "//mojo/public/cpp/system",
    "//ppapi/buildflags:buildflags",
    "//skia",
    "//testing/gtest",
  ]

  if (enable_plugins) {
    deps += [
      "//ppapi/c",
      "//third_party:freetype_harfbuzz",
    ]
  }
}