diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-17 10:41:13 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-17 10:41:13 +0000 |
commit | 4e3996f9796c4701fa0c880d7eca306384a5cf79 (patch) | |
tree | cef194b695a66915bce48b6bcf7a2b2e7a296781 /third_party | |
parent | 899ea5ff57817588996674cddf5fe46675755ba1 (diff) | |
download | chromium_src-4e3996f9796c4701fa0c880d7eca306384a5cf79.zip chromium_src-4e3996f9796c4701fa0c880d7eca306384a5cf79.tar.gz chromium_src-4e3996f9796c4701fa0c880d7eca306384a5cf79.tar.bz2 |
Add support for libxml as a system library target on iOS
Restructures the gyp conditions to make the system-lib and non-system-lib paths much clearer, and to ensure that if a new OS tries to use use_system_libxml it won't silently use the non-system path.
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10787018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146976 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/libxml/libxml.gyp | 78 |
1 files changed, 49 insertions, 29 deletions
diff --git a/third_party/libxml/libxml.gyp b/third_party/libxml/libxml.gyp index ac40290..79a1bc2 100644 --- a/third_party/libxml/libxml.gyp +++ b/third_party/libxml/libxml.gyp @@ -7,7 +7,7 @@ 'conditions': [ # Define an "os_include" variable that points at the OS-specific generated # headers. These were generated by running the configure script offline. - ['os_posix == 1 and OS != "mac"', { + ['os_posix == 1 and OS != "mac" and OS != "ios"', { 'os_include': 'linux' }], ['OS=="mac"', {'os_include': 'mac'}], @@ -19,35 +19,55 @@ { 'target_name': 'libxml', 'conditions': [ - ['os_posix == 1 and OS != "mac" and use_system_libxml', { - 'type': 'static_library', - 'sources': [ - 'chromium/libxml_utils.h', - 'chromium/libxml_utils.cc', - ], - 'cflags': [ - '<!@(pkg-config --cflags libxml-2.0)', - ], - 'defines': [ - 'USE_SYSTEM_LIBXML', + ['use_system_libxml', { + 'conditions': [ + ['os_posix == 1 and OS != "mac" and OS != "ios"', { + 'type': 'static_library', + 'sources': [ + 'chromium/libxml_utils.h', + 'chromium/libxml_utils.cc', + ], + 'cflags': [ + '<!@(pkg-config --cflags libxml-2.0)', + ], + 'defines': [ + 'USE_SYSTEM_LIBXML', + ], + 'direct_dependent_settings': { + 'cflags': [ + '<!@(pkg-config --cflags libxml-2.0)', + ], + 'defines': [ + 'USE_SYSTEM_LIBXML', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(pkg-config --libs-only-L --libs-only-other libxml-2.0)', + ], + 'libraries': [ + '<!@(pkg-config --libs-only-l libxml-2.0)', + ], + }, + }], + ['OS == "ios"', { + 'type': 'none', + 'all_dependent_settings': { + 'defines': [ + 'USE_SYSTEM_LIBXML', + ], + 'include_dirs': [ + '$(SDKROOT)/usr/include/libxml2', + ], + }, + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/usr/lib/libxml2.dylib', + ], + }, + }], ], - 'direct_dependent_settings': { - 'cflags': [ - '<!@(pkg-config --cflags libxml-2.0)', - ], - 'defines': [ - 'USE_SYSTEM_LIBXML', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(pkg-config --libs-only-L --libs-only-other libxml-2.0)', - ], - 'libraries': [ - '<!@(pkg-config --libs-only-l libxml-2.0)', - ], - }, - }, { # else: os_posix != 1 or OS == "mac" or ! use_system_libxml + }, { # else: !use_system_libxml 'type': 'static_library', 'sources': [ 'chromium/libxml_utils.h', |