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