blob: dea6ae83f0e864198d053e6be7138d10ecf9bf55 [file] [log] [blame]
[email protected]2f80c312009-02-25 21:26:551# 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]6a654d452011-05-23 22:06:548 ['os_posix == 1 and OS != "mac"', {
[email protected]60b2c072010-02-04 04:19:359 'os_include': 'linux'
10 }],
[email protected]2f80c312009-02-25 21:26:5511 ['OS=="mac"', {'os_include': 'mac'}],
12 ['OS=="win"', {'os_include': 'win32'}],
13 ],
[email protected]38bd91862010-04-28 00:52:5214 # 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]2f80c312009-02-25 21:26:5519 },
[email protected]2f80c312009-02-25 21:26:5520 'targets': [
21 {
22 'target_name': 'libxslt',
[email protected]2f80c312009-02-25 21:26:5523 'conditions': [
[email protected]6a654d452011-05-23 22:06:5424 ['os_posix == 1 and OS != "mac" and use_system_libxml', {
[email protected]50d8c0ee2011-09-22 17:59:4325 'type': 'none',
[email protected]d67a199ad2009-03-25 23:47:1826 'direct_dependent_settings': {
27 'cflags': [
[email protected]d2976b52009-08-13 18:08:5028 '<!@(pkg-config --cflags libxslt)',
[email protected]d67a199ad2009-03-25 23:47:1829 ],
30 },
31 'link_settings': {
[email protected]d2976b52009-08-13 18:08:5032 'ldflags': [
33 '<!@(pkg-config --libs-only-L --libs-only-other libxslt)',
34 ],
[email protected]d67a199ad2009-03-25 23:47:1835 'libraries': [
[email protected]d2976b52009-08-13 18:08:5036 '<!@(pkg-config --libs-only-l libxslt)',
[email protected]d67a199ad2009-03-25 23:47:1837 ],
38 },
[email protected]6a654d452011-05-23 22:06:5439 }, { # else: os_posix != 1 or OS == "mac" or ! use_system_libxml
[email protected]5a547332011-05-19 23:18:5340 'type': 'static_library',
[email protected]d67a199ad2009-03-25 23:47:1841 '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]b3c5f832010-02-25 23:20:1282 'libxslt/xsltlocale.c',
83 'libxslt/xsltlocale.h',
[email protected]d67a199ad2009-03-25 23:47:1884 '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]4ef03862012-01-30 19:05:23111 ['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]d67a199ad2009-03-25 23:47:18122 ],
123 }],
[email protected]2f80c312009-02-25 21:26:55124 ],
125 },
126 ],
127}