OLD | NEW |
| (Empty) |
1 # Copyright (c) 2006-2008 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 __doc__ = """ | |
6 Configuration for building zlib.lib / libzlib.a. | |
7 """ | |
8 | |
9 Import('env') | |
10 | |
11 if env.WantSystemLib('zlib'): | |
12 env.Append(ZLIB_LIB = ['z']) | |
13 Return() | |
14 | |
15 env = env.Clone() | |
16 | |
17 env.Append( | |
18 CPPPATH = ['$ZLIB_DIR'], | |
19 ZLIB_LIB = ['zlib'], | |
20 ) | |
21 | |
22 if env.Bit('windows'): | |
23 env.Append( | |
24 CCFLAGS = [ | |
25 '/TC', | |
26 '/wd4800', | |
27 ], | |
28 ) | |
29 | |
30 minizip_filter = MSVSFilter('minizip', [ | |
31 'contrib/minizip/ioapi.c', | |
32 'contrib/minizip/ioapi.h', | |
33 'contrib/minizip/iowin32.c', | |
34 'contrib/minizip/iowin32.h', | |
35 'contrib/minizip/unzip.c', | |
36 'contrib/minizip/unzip.h' | |
37 ]) | |
38 | |
39 input_files = ChromeFileList([ | |
40 minizip_filter, | |
41 | |
42 'adler32.c', | |
43 'compress.c', | |
44 'crc32.c', | |
45 'crc32.h', | |
46 'deflate.c', | |
47 'deflate.h', | |
48 'gzio.c', | |
49 'infback.c', | |
50 'inffast.c', | |
51 'inffast.h', | |
52 'inffixed.h', | |
53 'inflate.c', | |
54 'inflate.h', | |
55 'inftrees.c', | |
56 'inftrees.h', | |
57 'mozzconf.h', | |
58 'trees.c', | |
59 'trees.h', | |
60 'uncompr.c', | |
61 'zconf.h', | |
62 'zlib.h', | |
63 'zutil.c', | |
64 'zutil.h', | |
65 ]) | |
66 | |
67 if not env.Bit('windows'): | |
68 input_files.Remove( | |
69 'contrib/minizip/iowin32.c', | |
70 'contrib/minizip/iowin32.h', | |
71 ) | |
72 | |
73 if env.Bit('posix'): | |
74 env.Append( | |
75 CCFLAGS = [ | |
76 '-Wno-parentheses', | |
77 '-Wno-unused-variable', | |
78 ], | |
79 ) | |
80 | |
81 env.ChromeLibrary('zlib', input_files) | |
82 | |
83 p = env.ChromeMSVSProject('zlib.vcproj', | |
84 dest='$CHROME_SRC_DIR/third_party/zlib/zlib.vcproj', | |
85 guid='{8423AF0D-4B88-4EBF-94E1-E4D00D00E21C}', | |
86 keyword='Win32Proj', | |
87 files=input_files, | |
88 relative_path_prefix=r'./', | |
89 tools = [ | |
90 'VCLibrarianTool', | |
91 'VCCLCompilerTool', | |
92 ]) | |
93 | |
94 p.AddConfig('Debug|Win32', | |
95 ConfigurationType = '4', | |
96 InheritedPropertySheets = [ | |
97 '$(SolutionDir)../build/common.vsprops', | |
98 '$(SolutionDir)../build/debug.vsprops', | |
99 '$(SolutionDir)../build/external_code.vsprops', | |
100 './zlib.vsprops' | |
101 ]) | |
102 | |
103 p.AddConfig('Release|Win32', | |
104 ConfigurationType = '4', | |
105 InheritedPropertySheets = [ | |
106 '$(SolutionDir)../build/common.vsprops', | |
107 '$(SolutionDir)../build/release.vsprops', | |
108 '$(SolutionDir)../build/external_code.vsprops', | |
109 './zlib.vsprops' | |
110 ]) | |
OLD | NEW |