Tweak GYP to also link with XCode 7.

Using the XCode 7 beta, the file in the GYP doesn't exist, instead we get

/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libz.tbd

which is a text file describing libz and pointing to /usr/lib/libz.1.dylib.

There's a weird easy fix, which is that GYP looks for things in libraries like 'libz.dylib' and pattern match translates that to '-lz' on the command line.  (Infuriatingly, a literal '-lz' is interpreted as a file path...)

BUG=skia:

Review URL: https://codereview.chromium.org/1234493002
This commit is contained in:
mtklein 2015-07-13 08:13:03 -07:00 committed by Commit bot
parent 1c735488cb
commit 24d8249638

View File

@ -30,8 +30,8 @@
'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' ] },
# XCode needs a full library name, not -lz.
'link_settings': { 'libraries': [ 'libz.dylib' ] },
}],
[ 'skia_os not in ["mac", "ios", "win"]',{
'link_settings': { 'libraries': [ '-lz' ] },