1 # Copyright (c) 2012 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.
8 # On Linux, we implicitly already depend on expat via fontconfig;
9 # let's not pull it in twice.
10 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
11 'use_system_expat%': 1,
13 'use_system_expat%': 0,
20 'XML_STATIC', # Compile for static linkage.
27 ['use_system_expat == 1', {
30 'target_name': 'expat',
39 }, { # else: use_system_expat != 1
42 'target_name': 'expat',
43 'type': 'static_library',
46 'files/lib/xmlparse.c',
47 'files/lib/xmlrole.c',
51 # Prefer adding a dependency to expat and relying on the following
52 # direct_dependent_settings rule over manually adding the include
53 # path. This is because you'll want any translation units that
54 # #include these files to pick up the #defines as well.
55 'direct_dependent_settings': {
60 'XML_STATIC', # Tell dependants to expect static linkage.
69 ['OS=="mac" or OS=="ios" or OS=="android" or os_bsd==1', {
71 'HAVE_EXPAT_CONFIG_H',