[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1 | # Copyright (c) 2009 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. |
| 4 | |
| 5 | { |
| 6 | 'variables': { |
| 7 | 'conditions': [ |
[email protected] | 6a654d45 | 2011-05-23 22:06:54 | [diff] [blame] | 8 | ['os_posix == 1 and OS != "mac"', { |
[email protected] | 60b2c07 | 2010-02-04 04:19:35 | [diff] [blame] | 9 | 'os_include': 'linux' |
| 10 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 11 | ['OS=="mac"', {'os_include': 'mac'}], |
| 12 | ['OS=="win"', {'os_include': 'win32'}], |
| 13 | ], |
[email protected] | 38bd9186 | 2010-04-28 00:52:52 | [diff] [blame] | 14 | # We used to have a separate flag for using the system |
| 15 | # libxslt, but it seems mixing Chrome libxml and system |
| 16 | # libxslt causes crashes that nobody has had time to diagnose. |
| 17 | # So just put them both behind the same flag for now. |
| 18 | 'use_system_libxml%': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 19 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 20 | 'targets': [ |
| 21 | { |
| 22 | 'target_name': 'libxslt', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 23 | 'conditions': [ |
[email protected] | 6a654d45 | 2011-05-23 22:06:54 | [diff] [blame] | 24 | ['os_posix == 1 and OS != "mac" and use_system_libxml', { |
[email protected] | 50d8c0ee | 2011-09-22 17:59:43 | [diff] [blame] | 25 | 'type': 'none', |
[email protected] | d67a199ad | 2009-03-25 23:47:18 | [diff] [blame] | 26 | 'direct_dependent_settings': { |
| 27 | 'cflags': [ |
[email protected] | d2976b5 | 2009-08-13 18:08:50 | [diff] [blame] | 28 | '<!@(pkg-config --cflags libxslt)', |
[email protected] | d67a199ad | 2009-03-25 23:47:18 | [diff] [blame] | 29 | ], |
| 30 | }, |
| 31 | 'link_settings': { |
[email protected] | d2976b5 | 2009-08-13 18:08:50 | [diff] [blame] | 32 | 'ldflags': [ |
| 33 | '<!@(pkg-config --libs-only-L --libs-only-other libxslt)', |
| 34 | ], |
[email protected] | d67a199ad | 2009-03-25 23:47:18 | [diff] [blame] | 35 | 'libraries': [ |
[email protected] | d2976b5 | 2009-08-13 18:08:50 | [diff] [blame] | 36 | '<!@(pkg-config --libs-only-l libxslt)', |
[email protected] | d67a199ad | 2009-03-25 23:47:18 | [diff] [blame] | 37 | ], |
| 38 | }, |
[email protected] | 6a654d45 | 2011-05-23 22:06:54 | [diff] [blame] | 39 | }, { # else: os_posix != 1 or OS == "mac" or ! use_system_libxml |
[email protected] | 5a54733 | 2011-05-19 23:18:53 | [diff] [blame] | 40 | 'type': 'static_library', |
[email protected] | d67a199ad | 2009-03-25 23:47:18 | [diff] [blame] | 41 | 'sources': [ |
| 42 | 'libxslt/attributes.c', |
| 43 | 'libxslt/attributes.h', |
| 44 | 'libxslt/attrvt.c', |
| 45 | 'libxslt/documents.c', |
| 46 | 'libxslt/documents.h', |
| 47 | 'libxslt/extensions.c', |
| 48 | 'libxslt/extensions.h', |
| 49 | 'libxslt/extra.c', |
| 50 | 'libxslt/extra.h', |
| 51 | 'libxslt/functions.c', |
| 52 | 'libxslt/functions.h', |
| 53 | 'libxslt/imports.c', |
| 54 | 'libxslt/imports.h', |
| 55 | 'libxslt/keys.c', |
| 56 | 'libxslt/keys.h', |
| 57 | 'libxslt/libxslt.h', |
| 58 | 'libxslt/namespaces.c', |
| 59 | 'libxslt/namespaces.h', |
| 60 | 'libxslt/numbers.c', |
| 61 | 'libxslt/numbersInternals.h', |
| 62 | 'libxslt/pattern.c', |
| 63 | 'libxslt/pattern.h', |
| 64 | 'libxslt/preproc.c', |
| 65 | 'libxslt/preproc.h', |
| 66 | 'libxslt/security.c', |
| 67 | 'libxslt/security.h', |
| 68 | 'libxslt/templates.c', |
| 69 | 'libxslt/templates.h', |
| 70 | 'libxslt/transform.c', |
| 71 | 'libxslt/transform.h', |
| 72 | 'libxslt/trio.h', |
| 73 | 'libxslt/triodef.h', |
| 74 | 'libxslt/variables.c', |
| 75 | 'libxslt/variables.h', |
| 76 | 'libxslt/win32config.h', |
| 77 | 'libxslt/xslt.c', |
| 78 | 'libxslt/xslt.h', |
| 79 | 'libxslt/xsltconfig.h', |
| 80 | 'libxslt/xsltexports.h', |
| 81 | 'libxslt/xsltInternals.h', |
[email protected] | b3c5f83 | 2010-02-25 23:20:12 | [diff] [blame] | 82 | 'libxslt/xsltlocale.c', |
| 83 | 'libxslt/xsltlocale.h', |
[email protected] | d67a199ad | 2009-03-25 23:47:18 | [diff] [blame] | 84 | 'libxslt/xsltutils.c', |
| 85 | 'libxslt/xsltutils.h', |
| 86 | 'libxslt/xsltwin32config.h', |
| 87 | 'linux/config.h', |
| 88 | 'mac/config.h', |
| 89 | # TODO(port): Need a pregenerated win32/config.h? |
| 90 | ], |
| 91 | 'defines': [ |
| 92 | 'LIBXSLT_STATIC', |
| 93 | ], |
| 94 | 'include_dirs': [ |
| 95 | '<(os_include)', |
| 96 | '.', |
| 97 | ], |
| 98 | 'dependencies': [ |
| 99 | '../libxml/libxml.gyp:libxml', |
| 100 | ], |
| 101 | 'direct_dependent_settings': { |
| 102 | 'defines': [ |
| 103 | 'LIBXSLT_STATIC', |
| 104 | ], |
| 105 | 'include_dirs': [ |
| 106 | '.', |
| 107 | ], |
| 108 | }, |
| 109 | 'conditions': [ |
| 110 | ['OS!="win"', {'product_name': 'xslt'}], |
[email protected] | 4ef0386 | 2012-01-30 19:05:23 | [diff] [blame] | 111 | ['clang == 1', { |
| 112 | 'xcode_settings': { |
| 113 | 'WARNING_CFLAGS': [ |
| 114 | # libxslt stores a char[3] in a `const unsigned char*`. |
| 115 | '-Wno-pointer-sign', |
| 116 | ], |
| 117 | }, |
| 118 | 'cflags': [ |
| 119 | '-Wno-pointer-sign', |
| 120 | ], |
| 121 | }], |
[email protected] | d67a199ad | 2009-03-25 23:47:18 | [diff] [blame] | 122 | ], |
| 123 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 124 | ], |
| 125 | }, |
| 126 | ], |
| 127 | } |