diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 23:28:23 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 23:28:23 +0000 |
commit | 3ea496ce908dd469c5ad925bc7e5ad64a6292857 (patch) | |
tree | 56fa332b5a9e8a067aa28d4aff3a179faa056b4a /third_party | |
parent | 04f1602f0d206098d69fc9751573a64193ca1c11 (diff) | |
download | chromium_src-3ea496ce908dd469c5ad925bc7e5ad64a6292857.zip chromium_src-3ea496ce908dd469c5ad925bc7e5ad64a6292857.tar.gz chromium_src-3ea496ce908dd469c5ad925bc7e5ad64a6292857.tar.bz2 |
linux: don't double-depend on expat
We already depend on expat via fontconfig; pulling in two copies
of the same symbols is a recipe for disaster.
Review URL: http://codereview.chromium.org/385021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/expat/expat.gyp | 82 |
1 files changed, 50 insertions, 32 deletions
diff --git a/third_party/expat/expat.gyp b/third_party/expat/expat.gyp index 3224cc7..ab017f6 100644 --- a/third_party/expat/expat.gyp +++ b/third_party/expat/expat.gyp @@ -14,42 +14,60 @@ 'dependencies': [ ] }, - 'targets': [ - { - 'target_name': 'expat', - 'type': '<(library)', - 'sources': [ - 'files/lib/expat.h', - 'files/lib/xmlparse.c', - 'files/lib/xmlrole.c', - 'files/lib/xmltok.c', + 'conditions': [ + ['OS=="linux"', { + # On Linux, we implicitly already depend on expat via fontconfig; + # let's not pull it in twice. + 'targets': [ + { + 'target_name': 'expat', + 'type': 'settings', + 'link_settings': { + 'libraries': [ + '-lexpat', + ], + }, + }, ], - - # Prefer adding a dependency to expat and relying on the following - # direct_dependent_settings rule over manually adding the include - # path. This is because you'll want any translation units that - # #include these files to pick up the #defines as well. - 'direct_dependent_settings': { - 'include_dirs': [ - 'files/lib' - ], - 'defines': [ - 'XML_STATIC', # Tell dependants to expect static linkage. - ], - }, - 'conditions': [ - ['OS=="win"', { - 'defines': [ - 'COMPILED_FROM_DSP', + }, { # OS != linux + 'targets': [ + { + 'target_name': 'expat', + 'type': '<(library)', + 'sources': [ + 'files/lib/expat.h', + 'files/lib/xmlparse.c', + 'files/lib/xmlrole.c', + 'files/lib/xmltok.c', ], - }], - ['OS=="linux" or OS=="mac"', { - 'defines': [ - 'HAVE_EXPAT_CONFIG_H', + + # Prefer adding a dependency to expat and relying on the following + # direct_dependent_settings rule over manually adding the include + # path. This is because you'll want any translation units that + # #include these files to pick up the #defines as well. + 'direct_dependent_settings': { + 'include_dirs': [ + 'files/lib' + ], + 'defines': [ + 'XML_STATIC', # Tell dependants to expect static linkage. + ], + }, + 'conditions': [ + ['OS=="win"', { + 'defines': [ + 'COMPILED_FROM_DSP', + ], + }], + ['OS=="mac"', { + 'defines': [ + 'HAVE_EXPAT_CONFIG_H', + ], + }], ], - }], + }, ], - }, + }], ], } |