mtklein | 4e79f33 | 2016-02-07 13:31:23 -0800 | [diff] [blame] | 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 | |
| 6 | # Build expat from source. |
mtklein | 4e79f33 | 2016-02-07 13:31:23 -0800 | [diff] [blame] | 7 | |
| 8 | { |
djsollen | ec58b86 | 2016-07-15 12:52:34 -0700 | [diff] [blame] | 9 | 'targets': [ |
| 10 | { |
| 11 | 'target_name': 'expat', |
| 12 | 'type': 'none', |
| 13 | 'conditions': [ |
| 14 | [ 'skia_android_framework', { |
msarett | 80d46cc | 2016-07-15 14:18:49 -0700 | [diff] [blame] | 15 | 'dependencies': [ 'android_deps.gyp:expat_android' ], |
| 16 | 'export_dependent_settings': [ 'android_deps.gyp:expat_android' ], |
djsollen | ec58b86 | 2016-07-15 12:52:34 -0700 | [diff] [blame] | 17 | },{ |
| 18 | 'dependencies': [ 'expat.gyp:expat_static' ], |
| 19 | 'export_dependent_settings': [ 'expat.gyp:expat_static' ], |
| 20 | }] |
| 21 | ] |
| 22 | }, |
| 23 | { |
| 24 | 'target_name': 'expat_static', |
mtklein | 4e79f33 | 2016-02-07 13:31:23 -0800 | [diff] [blame] | 25 | 'type': 'static_library', |
fmalita | 771a190 | 2016-07-14 14:02:24 -0700 | [diff] [blame] | 26 | 'cflags': [ '-Wno-missing-field-initializers' ], |
| 27 | 'xcode_settings': { 'WARNING_CFLAGS': [ '-Wno-missing-field-initializers', ], }, |
| 28 | 'msvs_disabled_warnings': [4244], |
fmalita | 7445e86 | 2016-07-14 19:14:06 -0700 | [diff] [blame] | 29 | 'defines': [ |
| 30 | 'HAVE_EXPAT_CONFIG_H', |
| 31 | 'XML_STATIC', # Compile for static linkage. |
| 32 | ], |
fmalita | 771a190 | 2016-07-14 14:02:24 -0700 | [diff] [blame] | 33 | 'include_dirs': [ |
fmalita | 7445e86 | 2016-07-14 19:14:06 -0700 | [diff] [blame] | 34 | '../third_party/externals/expat', |
fmalita | 771a190 | 2016-07-14 14:02:24 -0700 | [diff] [blame] | 35 | ], |
mtklein | 4e79f33 | 2016-02-07 13:31:23 -0800 | [diff] [blame] | 36 | 'sources': [ |
| 37 | '../third_party/externals/expat/lib/xmlparse.c', |
| 38 | '../third_party/externals/expat/lib/xmlrole.c', |
| 39 | '../third_party/externals/expat/lib/xmltok.c', |
| 40 | ], |
| 41 | 'direct_dependent_settings': { |
fmalita | 7445e86 | 2016-07-14 19:14:06 -0700 | [diff] [blame] | 42 | 'include_dirs': [ |
| 43 | '../third_party/externals/expat/lib', |
| 44 | ], |
| 45 | 'defines': [ |
| 46 | 'XML_STATIC', # Tell dependants to expect static linkage. |
| 47 | ], |
mtklein | 4e79f33 | 2016-02-07 13:31:23 -0800 | [diff] [blame] | 48 | }, |
| 49 | }] |
| 50 | } |