OLD | NEW |
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 __doc__ = """ | 5 __doc__ = """ |
6 Configuration for building zlib.lib / libzlib.a. | 6 Configuration for building zlib.lib / libzlib.a. |
7 """ | 7 """ |
8 | 8 |
9 Import('env') | 9 Import('env') |
10 | 10 |
11 if env.WantSystemLib('zlib'): | 11 if env.WantSystemLib('zlib'): |
12 env.Append(ZLIB_LIB = ['z']) | 12 env.Append(ZLIB_LIB = ['z']) |
13 Return() | 13 Return() |
14 | 14 |
15 env = env.Clone() | 15 env = env.Clone() |
16 | 16 |
17 env.Append( | 17 env.Append( |
18 ZLIB_LIB = ['zlib'], | 18 ZLIB_LIB = ['zlib'], |
19 ) | 19 ) |
20 | 20 |
21 if env.Bit('windows'): | 21 if env.Bit('windows'): |
22 env.Append( | 22 env.Append( |
23 CCFLAGS = [ | 23 CCFLAGS = [ |
24 '/TC', | 24 '/TC', |
25 '/wd4800', | 25 '/wd4800', |
26 ], | 26 ], |
27 ) | 27 ) |
28 | 28 |
29 input_files = [ | 29 input_files = ChromeFileList([ |
30 'adler32.c', | 30 'adler32.c', |
31 'compress.c', | 31 'compress.c', |
32 'crc32.c', | 32 'crc32.c', |
| 33 'crc32.h', |
33 'deflate.c', | 34 'deflate.c', |
| 35 'deflate.h', |
34 'gzio.c', | 36 'gzio.c', |
35 'infback.c', | 37 'infback.c', |
36 'inffast.c', | 38 'inffast.c', |
| 39 'inffast.h', |
| 40 'inffixed.h', |
37 'inflate.c', | 41 'inflate.c', |
| 42 'inflate.h', |
38 'inftrees.c', | 43 'inftrees.c', |
| 44 'inftrees.h', |
| 45 'mozzconf.h', |
39 'trees.c', | 46 'trees.c', |
| 47 'trees.h', |
40 'uncompr.c', | 48 'uncompr.c', |
| 49 'zconf.h', |
| 50 'zlib.h', |
41 'zutil.c', | 51 'zutil.c', |
42 ] | 52 'zutil.h', |
| 53 ]) |
43 | 54 |
44 env.ChromeStaticLibrary('zlib', input_files) | 55 env.ChromeStaticLibrary('zlib', input_files) |
45 | 56 |
46 env.ChromeMSVSProject('$ZLIB_DIR/zlib.vcproj', | 57 p = env.ChromeMSVSProject('zlib.vcproj', |
47 guid='{8423AF0D-4B88-4EBF-94E1-E4D00D00E21C}') | 58 guid='{8423AF0D-4B88-4EBF-94E1-E4D00D00E21C}', |
| 59 files=input_files, |
| 60 relative_path_prefix=r'./', |
| 61 tools = [ |
| 62 'VCLibrarianTool', |
| 63 'VCCLCompilerTool', |
| 64 ]) |
| 65 |
| 66 p.AddConfig('Debug|Win32', |
| 67 ConfigurationType = '4', |
| 68 InheritedPropertySheets = [ |
| 69 '$(SolutionDir)../build/common.vsprops', |
| 70 '$(SolutionDir)../build/debug.vsprops', |
| 71 '$(SolutionDir)../build/external_code.vsprops', |
| 72 ]) |
| 73 |
| 74 p.AddConfig('Release|Win32', |
| 75 ConfigurationType = '4', |
| 76 InheritedPropertySheets = [ |
| 77 '$(SolutionDir)../build/common.vsprops', |
| 78 '$(SolutionDir)../build/release.vsprops', |
| 79 '$(SolutionDir)../build/external_code.vsprops', |
| 80 ]) |
| 81 |
| 82 env.AlwaysBuild(p) |
| 83 |
| 84 i = env.Command('$CHROME_SRC_DIR/third_party/zlib/zlib.vcproj', p, |
| 85 Copy('$TARGET', '$SOURCE')) |
| 86 Alias('msvs', i) |
OLD | NEW |