Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: gyp/zlib.gyp

Issue 152513007: Build Skia for a bare-bones embedded Linux system. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: again Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gyp/zlib.gyp
diff --git a/gyp/zlib.gyp b/gyp/zlib.gyp
index b26053eaf17dff16c595dfe1a88641f94f9ad91c..65394713da043805dae717cce8b2781507641664 100644
--- a/gyp/zlib.gyp
+++ b/gyp/zlib.gyp
@@ -1,48 +1,78 @@
-# Target for including zlib.
+# Copyright 2014 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
{
+ 'variables': {
+ 'skia_warnings_as_errors': 0,
+ },
'targets': [
{
'target_name': 'zlib',
- 'type': 'static_library',
- 'dependencies': [
- 'skia_lib.gyp:skia_lib',
- ],
- 'sources': [
- '../include/core/SkFlate.h',
-
- '../src/core/SkFlate.cpp',
- ],
'conditions': [
- [ 'skia_os == "mac"', {
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/usr/lib/libz.dylib',
+ [ 'skia_zlib_static',
+ {
+ 'type': 'static_library',
+ 'include_dirs': [
+ '../third_party/externals/zlib',
],
- },
- 'defines': [ 'SK_ZLIB_INCLUDE=<zlib.h>', ],
- }],
- [ 'skia_os == "ios"', {
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/usr/lib/libz.dylib',
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'SK_ZLIB_INCLUDE=<zlib.h>',
+ ],
+ 'include_dirs': [
+ '../third_party/externals/zlib',
+ ],
+ },
+ 'sources': [
+ '../third_party/externals/zlib/src/adler32.c',
+ '../third_party/externals/zlib/src/compress.c',
+ '../third_party/externals/zlib/src/crc32.c',
+ '../third_party/externals/zlib/src/deflate.c',
+ '../third_party/externals/zlib/src/gzclose.c',
+ '../third_party/externals/zlib/src/gzlib.c',
+ '../third_party/externals/zlib/src/gzread.c',
+ '../third_party/externals/zlib/src/gzwrite.c',
+ '../third_party/externals/zlib/src/infback.c',
+ '../third_party/externals/zlib/src/inffast.c',
+ '../third_party/externals/zlib/src/inflate.c',
+ '../third_party/externals/zlib/src/inftrees.c',
+ '../third_party/externals/zlib/src/trees.c',
+ '../third_party/externals/zlib/src/uncompr.c',
+ '../third_party/externals/zlib/src/zutil.c',
],
- },
- 'defines': [ 'SK_ZLIB_INCLUDE=<zlib.h>', ],
- }],
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "nacl"]', {
- 'link_settings': { 'libraries': [ '-lz', ], },
- 'conditions': [
- [ 'skia_android_framework==0', {
- 'defines': [ 'SK_ZLIB_INCLUDE=<zlib.h>', ],
- }],
- ],
- }],
- [ 'skia_android_framework', {
- 'include_dirs': [
- 'external/zlib',
- ],
- }],
- ],
- },
- ],
+ }, { # not skia_zlib_static
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'conditions': [
+ [ 'skia_android_framework', {
+ 'include_dirs': [
+ 'external/zlib',
+ ],
+ }, {
+ 'defines': [
+ 'SK_ZLIB_INCLUDE=<zlib.h>',
+ ],
+ }]
+ ],
+ 'link_settings': {
+ 'conditions': [
+ [ 'skia_os == "mac" or skia_os == "ios"', {
+ 'libraries': [
+ '$(SDKROOT)/usr/lib/libz.dylib',
+ ]
+ }, { # skia_os != "mac" and skia_os != "ios"
+ 'libraries': [
+ '-lz',
+ ]
+ }],
+ ],
+ }
+ },
+ }
+ ]
+ ]
+ }
+ ]
}

Powered by Google App Engine
This is Rietveld 408576698