• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2016 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6declare_args() {
7  skia_use_system_expat = is_official_build
8}
9
10import("../third_party.gni")
11
12if (skia_use_system_expat) {
13  system("expat") {
14    libs = [ "expat" ]
15  }
16} else {
17  third_party("expat") {
18    _src = "../externals/expat"
19
20    public_defines = [ "XML_STATIC" ]
21
22    public_include_dirs = [
23      "../externals/expat/expat/lib",
24      "include/expat_config",
25    ]
26
27    public = [ "$_src/expat/lib/expat.h" ]
28    sources = [
29      "$_src/expat/lib/ascii.h",
30      "$_src/expat/lib/asciitab.h",
31      "$_src/expat/lib/expat_external.h",
32      "$_src/expat/lib/iasciitab.h",
33      "$_src/expat/lib/internal.h",
34      "$_src/expat/lib/latin1tab.h",
35      "$_src/expat/lib/nametab.h",
36      "$_src/expat/lib/siphash.h",
37      "$_src/expat/lib/utf8tab.h",
38      "$_src/expat/lib/winconfig.h",
39      "$_src/expat/lib/xmlparse.c",
40      "$_src/expat/lib/xmlrole.c",
41      "$_src/expat/lib/xmlrole.h",
42      "$_src/expat/lib/xmltok.c",
43      "$_src/expat/lib/xmltok.h",
44      "$_src/expat/lib/xmltok_impl.h",
45    ]
46
47    unused_sources = [
48      # Not independently compiled, but conditionally included in xmltok.c
49      "$_src/expat/lib/xmltok_impl.c",
50      "$_src/expat/lib/xmltok_ns.c",
51    ]
52    assert(unused_sources != [])
53  }
54}
55