OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 if (is_android) { | 5 if (is_android) { |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 } | 7 } |
8 | 8 |
9 if (is_linux) { | 9 if (is_linux) { |
10 config("expat_config") { | 10 config("expat_config") { |
11 libs = [ "expat" ] | 11 libs = [ "expat" ] |
12 } | 12 } |
13 | 13 |
14 group("expat") { | 14 group("expat") { |
15 direct_dependent_configs = [ ":expat_config" ] | 15 direct_dependent_configs = [ ":expat_config" ] |
16 } | 16 } |
17 | 17 |
18 # TODO(GYP) Android needs direct dependent includes of | 18 # TODO(GYP) Android needs direct dependent includes of |
19 # <android_src>/external/expat/lib | 19 # <android_src>/external/expat/lib |
20 } else { | 20 } else { |
21 config("expat_config") { | 21 config("expat_config") { |
22 include_dirs = [ "files/lib" ] | 22 include_dirs = [ "files/lib" ] |
23 if (is_android) { | 23 if (is_android) { |
24 include_dirs += [ "$android_src/external/expat/lib" ] | 24 include_dirs += [ "$android_src/external/expat/lib" ] |
25 } | 25 } |
26 defines = [ "XML_STATIC" ] | 26 defines = [ "XML_STATIC" ] |
27 } | 27 } |
28 | 28 |
29 static_library("expat") { | 29 source_set("expat") { |
30 sources = [ | 30 sources = [ |
31 "files/lib/expat.h", | 31 "files/lib/expat.h", |
32 "files/lib/xmlparse.c", | 32 "files/lib/xmlparse.c", |
33 "files/lib/xmlrole.c", | 33 "files/lib/xmlrole.c", |
34 "files/lib/xmltok.c", | 34 "files/lib/xmltok.c", |
35 ] | 35 ] |
36 | 36 |
37 direct_dependent_configs = [ ":expat_config" ] | 37 direct_dependent_configs = [ ":expat_config" ] |
38 | 38 |
39 defines = [ "_LIB" ] | 39 defines = [ "_LIB" ] |
40 if (is_win) { | 40 if (is_win) { |
41 defines += [ "COMPILED_FROM_DSP" ] | 41 defines += [ "COMPILED_FROM_DSP" ] |
42 } else { | 42 } else { |
43 defines += [ "HAVE_EXPAT_CONFIG_H" ] | 43 defines += [ "HAVE_EXPAT_CONFIG_H" ] |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
OLD | NEW |