skia2/gyp/zlib.gyp
mtklein e6cf9cb685 miniz support in SkFlate / PDF
- Adds miniz.c v115_r4 (latest release) to third_party.
   - Merges SkDeflateWStream into SkFlate so including "miniz.c" links
     without duplicating symbols.

The only interesting code change I've made is to remove the line
     fImpl->fZStream.data_type = Z_BINARY;
from SkDeflateWStream::SkDeflateWStream().  miniz doesn't have Z_BINARY
defined, and as far as I can tell, both zlib and miniz ignore data_type.

We should be able to swap skflate.gyp's dependency between zlib.gyp:zlib and
zlib.gyp:miniz at will (except of course on Windows) if we're interested in
zlib itself.  I've left android framework on its own zlib.  I think this all
means we can stop defining SK_NO_FLATE on Windows.

I'll leave the possible cleanup of SK_NO_FLATE itself for another time.  Might
be we always want to keep this dependency optional.

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-ShuttleA-HD7770-x86-Debug-Trybot

BUG=skia:

Review URL: https://codereview.chromium.org/957323003
2015-02-26 13:25:05 -08:00

32 lines
970 B
Python

# Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [{
'target_name': 'zlib',
'type': 'none',
'direct_dependent_settings': {
'conditions': [
[ 'skia_android_framework', { 'include_dirs': [ 'external/zlib' ] }],
[ 'skia_os == "mac" or skia_os == "ios"', {
# XCode needs and explicit file path, not a logical name like -lz.
'link_settings': { 'libraries': [ '$(SDKROOT)/usr/lib/libz.dylib' ] },
},{
'link_settings': { 'libraries': [ '-lz' ] },
}]
],
},
},{
'target_name': 'miniz',
'type': 'none',
'direct_dependent_settings': {
'include_dirs': [ '../third_party/miniz' ],
'defines': [ 'ZLIB_INCLUDE="miniz.c"' ],
# Not ideal, but GCC's issuing an otherwise-unstoppable (but innocuous) warning from miniz.c
'cflags': [ '-w' ],
},
}],
}