Merge remote branch 'origin/v0.4'
[platform/upstream/nodejs.git] / deps / zlib / zlib.gyp
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     'use_system_zlib%': 0
8   },
9   'conditions': [
10     ['use_system_zlib==0', {
11       'targets': [
12         {
13           'target_name': 'zlib',
14           'type': 'static_library',
15           'sources': [
16             'contrib/minizip/ioapi.c',
17             'contrib/minizip/ioapi.h',
18             'contrib/minizip/iowin32.c',
19             'contrib/minizip/iowin32.h',
20             'contrib/minizip/unzip.c',
21             'contrib/minizip/unzip.h',
22             'contrib/minizip/zip.c',
23             'contrib/minizip/zip.h',
24             'adler32.c',
25             'compress.c',
26             'crc32.c',
27             'crc32.h',
28             'deflate.c',
29             'deflate.h',
30             'gzio.c',
31             'infback.c',
32             'inffast.c',
33             'inffast.h',
34             'inffixed.h',
35             'inflate.c',
36             'inflate.h',
37             'inftrees.c',
38             'inftrees.h',
39             'mozzconf.h',
40             'trees.c',
41             'trees.h',
42             'uncompr.c',
43             'zconf.h',
44             'zlib.h',
45             'zutil.c',
46             'zutil.h',
47           ],
48           'include_dirs': [
49             '.',
50             # For contrib/minizip
51             './contrib/minizip',
52           ],
53           'direct_dependent_settings': {
54             'include_dirs': [
55               '.',
56             ],
57           },
58           'conditions': [
59             ['OS!="win"', {
60               'product_name': 'chrome_zlib',
61               'sources!': [
62                 'contrib/minizip/iowin32.c'
63               ],
64             }],
65           ],
66         },
67       ],
68     }, {
69       'targets': [
70         {
71           'target_name': 'zlib',
72           'type': 'static_library',
73           'direct_dependent_settings': {
74             'defines': [
75               'USE_SYSTEM_ZLIB',
76             ],
77           },
78           'defines': [
79             'USE_SYSTEM_ZLIB',
80           ],
81           'sources': [
82             'contrib/minizip/ioapi.c',
83             'contrib/minizip/ioapi.h',
84             'contrib/minizip/unzip.c',
85             'contrib/minizip/unzip.h',
86             'contrib/minizip/zip.c',
87             'contrib/minizip/zip.h',
88           ],
89           'link_settings': {
90             'libraries': [
91               '-lz',
92             ],
93           },
94         },
95       ],
96     }],
97   ],
98 }