| OLD | NEW |
| (Empty) |
| 1 # Copyright 2009, Google Inc. | |
| 2 # All rights reserved. | |
| 3 # | |
| 4 # Redistribution and use in source and binary forms, with or without | |
| 5 # modification, are permitted provided that the following conditions are | |
| 6 # met: | |
| 7 # | |
| 8 # * Redistributions of source code must retain the above copyright | |
| 9 # notice, this list of conditions and the following disclaimer. | |
| 10 # * Redistributions in binary form must reproduce the above | |
| 11 # copyright notice, this list of conditions and the following disclaimer | |
| 12 # in the documentation and/or other materials provided with the | |
| 13 # distribution. | |
| 14 # * Neither the name of Google Inc. nor the names of its | |
| 15 # contributors may be used to endorse or promote products derived from | |
| 16 # this software without specific prior written permission. | |
| 17 # | |
| 18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| 22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
| 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
| 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 29 | |
| 30 | |
| 31 # Import the build environment that was decided in the project SConstruct. | |
| 32 # This may be the Debug or Optimized environment | |
| 33 import os.path; | |
| 34 | |
| 35 Import('env') | |
| 36 | |
| 37 env.Append(CPPPATH = env['RENDERER_INCLUDE_PATH']) | |
| 38 | |
| 39 # Create the PNG library ------------------------------------------------------- | |
| 40 env_png = env.Clone() | |
| 41 png_sources = [ | |
| 42 'png', | |
| 43 'pngerror', | |
| 44 'pnggccrd', | |
| 45 'pngget', | |
| 46 'pngmem', | |
| 47 'pngpread', | |
| 48 'pngread', | |
| 49 'pngrio', | |
| 50 'pngrtran', | |
| 51 'pngrutil', | |
| 52 'pngset', | |
| 53 'pngtrans', | |
| 54 'pngvcrd', | |
| 55 'pngwio', | |
| 56 'pngwrite', | |
| 57 'pngwtran', | |
| 58 'pngwutil', | |
| 59 ] | |
| 60 | |
| 61 if env.Bit('windows'): | |
| 62 env_png.Append( | |
| 63 CCFLAGS = [ | |
| 64 '/wd4267', # disable warning about implicit size_t conversions | |
| 65 '/wd4996', # disable warning about unsafe string functions | |
| 66 ], | |
| 67 ) | |
| 68 | |
| 69 png_objects = env_png.MakeObjects(png_sources, '$PNG_DIR', 'c') | |
| 70 png_lib = env_png.ComponentLibrary('libpng', png_objects) | |
| 71 | |
| 72 | |
| 73 # Create the JPEG library ------------------------------------------------------ | |
| 74 env_jpeg = env.Clone() | |
| 75 jpeg_sources = [ | |
| 76 'jcapimin', | |
| 77 'jcapistd', | |
| 78 'jccoefct', | |
| 79 'jccolor', | |
| 80 'jcdctmgr', | |
| 81 'jchuff', | |
| 82 'jcinit', | |
| 83 'jcmainct', | |
| 84 'jcmarker', | |
| 85 'jcmaster', | |
| 86 'jcomapi', | |
| 87 'jcparam', | |
| 88 'jcphuff', | |
| 89 'jcprepct', | |
| 90 'jcsample', | |
| 91 'jctrans', | |
| 92 'jdapimin', | |
| 93 'jdapistd', | |
| 94 'jdatadst', | |
| 95 'jdatasrc', | |
| 96 'jdcoefct', | |
| 97 'jdcolor', | |
| 98 'jddctmgr', | |
| 99 'jdhuff', | |
| 100 'jdinput', | |
| 101 'jdmainct', | |
| 102 'jdmarker', | |
| 103 'jdmaster', | |
| 104 'jdmerge', | |
| 105 'jdphuff', | |
| 106 'jdpostct', | |
| 107 'jdsample', | |
| 108 'jdtrans', | |
| 109 'jerror', | |
| 110 'jfdctflt', | |
| 111 'jfdctfst', | |
| 112 'jfdctint', | |
| 113 'jidctflt', | |
| 114 'jidctfst', | |
| 115 'jidctint', | |
| 116 'jidctred', | |
| 117 'jmemmgr', | |
| 118 'jmemnobs', | |
| 119 'jquant1', | |
| 120 'jquant2', | |
| 121 'jutils', | |
| 122 ] | |
| 123 | |
| 124 if env.Bit('windows'): | |
| 125 env_jpeg.Append( | |
| 126 CCFLAGS = [ | |
| 127 '/TC', # compile as C, not C++ | |
| 128 '/wd4267', # disable warning about implicit size_t conversions | |
| 129 '/wd4996', # disable warning about unsafe string functions | |
| 130 ], | |
| 131 CPPDEFINES = ['_CRT_SECURE_NO_DEPRECATE'], | |
| 132 ) | |
| 133 | |
| 134 jpeg_objects = env_jpeg.MakeObjects(jpeg_sources, '$JPEG_DIR', 'c') | |
| 135 jpeg_lib = env_jpeg.ComponentLibrary('libjpeg', jpeg_objects) | |
| 136 | |
| 137 minizip_inputs = [ | |
| 138 'ioapi', | |
| 139 'mztools', | |
| 140 'unzip', | |
| 141 'zip', | |
| 142 ] | |
| 143 minizip_objects = env.MakeObjects(minizip_inputs, | |
| 144 '$ZLIB_DIR/contrib/minizip', | |
| 145 'c') | |
| 146 | |
| 147 zlib_inputs = [ | |
| 148 'adler32', | |
| 149 'compress', | |
| 150 'crc32', | |
| 151 'deflate', | |
| 152 'gzio', | |
| 153 'infback', | |
| 154 'inffast', | |
| 155 'inflate', | |
| 156 'inftrees', | |
| 157 'trees', | |
| 158 'uncompr', | |
| 159 'zutil', | |
| 160 ] | |
| 161 zlib_objects = env.MakeObjects(zlib_inputs, '$ZLIB_DIR', 'c') | |
| 162 | |
| 163 zlib_lib = env.ComponentLibrary('zlib', zlib_objects + minizip_objects) | |
| OLD | NEW |