1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5assert(is_linux)
6
7config("fontconfig_config") {
8  include_dirs = [ "src" ]
9}
10
11component("fontconfig") {
12  sources = [
13    "src/src/fcarch.h",
14    "src/src/fcatomic.c",
15    "src/src/fcblanks.c",
16    "src/src/fccache.c",
17    "src/src/fccfg.c",
18    "src/src/fccharset.c",
19    "src/src/fccompat.c",
20    "src/src/fcdbg.c",
21    "src/src/fcdefault.c",
22    "src/src/fcdir.c",
23    "src/src/fcformat.c",
24    "src/src/fcfreetype.c",
25    "src/src/fcfs.c",
26    "src/src/fchash.c",
27    "src/src/fcinit.c",
28    "src/src/fclang.c",
29    "src/src/fclist.c",
30    "src/src/fcmatch.c",
31    "src/src/fcmatrix.c",
32    "src/src/fcname.c",
33    "src/src/fcobjs.c",
34    "src/src/fcpat.c",
35    "src/src/fcserialize.c",
36    "src/src/fcstat.c",
37    "src/src/fcstr.c",
38    "src/src/fcxml.c",
39    "src/src/ftglue.h",
40    "src/src/ftglue.c",
41  ]
42
43  include_dirs = [
44    "include",
45    "include/src",
46  ]
47
48  defines = [
49    "HAVE_CONFIG_H",
50    "FC_CACHEDIR=\"/var/cache/fontconfig\"",
51    "FONTCONFIG_PATH=\"/etc/fonts\"",
52  ]
53
54  deps = [
55    "//third_party/zlib",
56    "//third_party/libxml",
57  ]
58
59  configs -= [ "//build/config/compiler:chromium_code" ]
60  configs += [
61    "//build/config/compiler:no_chromium_code",
62    "//build/config/linux:freetype2",
63  ]
64
65  public_configs = [ ":fontconfig_config" ]
66
67  if (is_clang) {
68    # Work around a null-conversion warning. See crbug.com/358852.
69    cflags = [ "-Wno-non-literal-null-conversion" ]
70  }
71}
72