fix xcode build

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/936033003
diff --git a/gyp/zlib.gyp b/gyp/zlib.gyp
index a573dc7..e2424db 100644
--- a/gyp/zlib.gyp
+++ b/gyp/zlib.gyp
@@ -7,10 +7,15 @@
   'targets': [{
     'target_name': 'zlib',
     'type': 'none',
-    'link_settings': { 'libraries': [ '-lz' ] },
     'direct_dependent_settings': {
       'conditions': [
-        [ 'skia_android_framework', { 'include_dirs': [ 'external/zlib' ] }]
+        [ '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' ] },
+        }]
       ],
     },
   }],