1# Copyright (c) 2012 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  'targets': [
7    {
8      'target_name': 'zlib',
9      'type': 'static_library',
10      'sources': [
11        'adler32.c',
12        'compress.c',
13        'crc32.c',
14        'crc32.h',
15        'deflate.c',
16        'deflate.h',
17        'gzclose.c',
18        'gzguts.h',
19        'gzlib.c',
20        'gzread.c',
21        'gzwrite.c',
22        'infback.c',
23        'inffast.c',
24        'inffast.h',
25        'inffixed.h',
26        'inflate.c',
27        'inflate.h',
28        'inftrees.c',
29        'inftrees.h',
30        'mozzconf.h',
31        'trees.c',
32        'trees.h',
33        'uncompr.c',
34        'zconf.h',
35        'zlib.h',
36        'zutil.c',
37        'zutil.h',
38      ],
39      'include_dirs': [
40        '.',
41      ],
42      'direct_dependent_settings': {
43        'include_dirs': [
44          '.',
45        ],
46      },
47      'conditions': [
48        ['OS!="win"', {
49          'product_name': 'chrome_zlib',
50        }], ['OS=="android"', {
51          'toolsets': ['target', 'host'],
52        }],
53      ],
54    },
55    {
56      'target_name': 'minizip',
57      'type': 'static_library',
58      'sources': [
59        'contrib/minizip/ioapi.c',
60        'contrib/minizip/ioapi.h',
61        'contrib/minizip/iowin32.c',
62        'contrib/minizip/iowin32.h',
63        'contrib/minizip/unzip.c',
64        'contrib/minizip/unzip.h',
65        'contrib/minizip/zip.c',
66        'contrib/minizip/zip.h',
67      ],
68      'dependencies': [
69        'zlib',
70      ],
71      'include_dirs': [
72        '.',
73        '../..',
74      ],
75      'direct_dependent_settings': {
76        'include_dirs': [
77          '.',
78        ],
79      },
80      'variables': {
81        'clang_warning_flags': [
82          # zlib uses `if ((a == b))` for some reason.
83          '-Wno-parentheses-equality',
84        ],
85      },
86      'conditions': [
87        ['OS!="win"', {
88          'sources!': [
89            'contrib/minizip/iowin32.c'
90          ],
91        }],
92        ['OS=="android"', {
93          'toolsets': ['target', 'host'],
94        }],
95        ['OS=="mac" or OS=="ios" or os_bsd==1 or OS=="android"', {
96          # Mac, Android and the BSDs don't have fopen64, ftello64, or
97          # fseeko64. We use fopen, ftell, and fseek instead on these
98          # systems.
99          'defines': [
100            'USE_FILE32API'
101          ],
102        }],
103      ],
104    },
105  ],
106}
107