summaryrefslogtreecommitdiffstats
path: root/third_party/zlib
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 21:15:21 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 21:15:21 +0000
commit9381955a74a685979fc4f873de9684a7a791c0d3 (patch)
treed10194d54888a3163bbe4bb6a696f32e02213bf9 /third_party/zlib
parent812c63ab2c3e779fbe1f7325a663b0cfe409e224 (diff)
downloadchromium_src-9381955a74a685979fc4f873de9684a7a791c0d3.zip
chromium_src-9381955a74a685979fc4f873de9684a7a791c0d3.tar.gz
chromium_src-9381955a74a685979fc4f873de9684a7a791c0d3.tar.bz2
Reduce duplication in third_party/zlib/zlib.gyp.
Also, move the clang warning flags to the block that's shared for system / nonsystem zlib use. BUG=none TEST=fewer warnings when building with clang on linux NOTRY=true Review URL: http://codereview.chromium.org/9965119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/zlib')
-rw-r--r--third_party/zlib/zlib.gyp72
1 files changed, 29 insertions, 43 deletions
diff --git a/third_party/zlib/zlib.gyp b/third_party/zlib/zlib.gyp
index 7e161da..4215f62 100644
--- a/third_party/zlib/zlib.gyp
+++ b/third_party/zlib/zlib.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -15,12 +15,12 @@
}],
],
},
- 'conditions': [
- ['use_system_zlib==0', {
- 'targets': [
- {
- 'target_name': 'zlib',
- 'type': 'static_library',
+ 'targets': [
+ {
+ 'target_name': 'zlib',
+ 'type': 'static_library',
+ 'conditions': [
+ ['use_system_zlib==0', {
'sources': [
'contrib/minizip/ioapi.c',
'contrib/minizip/ioapi.h',
@@ -71,33 +71,8 @@
'contrib/minizip/iowin32.c'
],
}],
- ['OS=="mac" or os_bsd==1 or OS=="android"', {
- # Mac, Android and the BSDs don't have fopen64, ftello64, or
- # fseeko64. We use fopen, ftell, and fseek instead on these
- # systems.
- 'defines': [
- 'USE_FILE32API'
- ],
- }],
- ['clang==1', {
- 'xcode_settings': {
- 'WARNING_CFLAGS': [
- # zlib uses `if ((a == b))` for some reason.
- '-Wno-parentheses-equality',
- ],
- },
- 'cflags': [
- '-Wno-parentheses-equality',
- ],
- }],
],
- },
- ],
- }, {
- 'targets': [
- {
- 'target_name': 'zlib',
- 'type': 'static_library',
+ }, {
'direct_dependent_settings': {
'defines': [
'USE_SYSTEM_ZLIB',
@@ -115,14 +90,6 @@
'contrib/minizip/zip.h',
],
'conditions': [
- ['OS=="mac" or os_bsd==1 or OS=="android"', {
- # Mac, Android and the BSDs don't have fopen64, ftello64, or
- # fseeko64. We use fopen, ftell, and fseek instead on these
- # systems.
- 'defines': [
- 'USE_FILE32API'
- ],
- }],
['OS=="android"', {
'toolsets': ['target', 'host'],
}],
@@ -132,8 +99,27 @@
'-lz',
],
},
- },
+ }],
+ ['OS=="mac" or os_bsd==1 or OS=="android"', {
+ # Mac, Android and the BSDs don't have fopen64, ftello64, or
+ # fseeko64. We use fopen, ftell, and fseek instead on these
+ # systems.
+ 'defines': [
+ 'USE_FILE32API'
+ ],
+ }],
+ ['clang==1', {
+ 'xcode_settings': {
+ 'WARNING_CFLAGS': [
+ # zlib uses `if ((a == b))` for some reason.
+ '-Wno-parentheses-equality',
+ ],
+ },
+ 'cflags': [
+ '-Wno-parentheses-equality',
+ ],
+ }],
],
- }],
+ }
],
}