aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar humper@google.com <humper@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-08 21:45:33 +0000
committerGravatar humper@google.com <humper@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-08 21:45:33 +0000
commit522dbd2e626075366a8e880300305fadb0ad8839 (patch)
tree91348fbde843ab60c5b48d11c3424880f34a481e /gyp
parent6438695222333981fafee9c8c09f3bf51dce3816 (diff)
match chromium's approach for locating the most appropriate macos SDK to use
By doing this, the ninja generator for gyp works great on macos, resulting in faster (I think) and much, much terser builds. BUG= Review URL: https://codereview.appspot.com/7142047 git-svn-id: http://skia.googlecode.com/svn/trunk@7684 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gyp')
-rw-r--r--gyp/common_conditions.gypi11
-rw-r--r--gyp/common_variables.gypi2
2 files changed, 11 insertions, 2 deletions
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index d1368ddacb..cfcc7f2c0d 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -195,6 +195,9 @@
['skia_os == "mac"',
{
+ 'variables': {
+ 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)',
+ },
'defines': [
'SK_BUILD_FOR_MAC',
],
@@ -228,7 +231,13 @@
},
'xcode_settings': {
'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
- 'SDKROOT': '<(skia_osx_sdkroot)',
+ 'conditions': [
+ ['skia_osx_sdkroot==""', {
+ 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
+ }, {
+ 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot
+ }],
+ ],
# trying to get this to work, but it needs clang I think...
# 'WARNING_CFLAGS': '-Wexit-time-destructors',
'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index 5aca19c23b..13e681dcc6 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -87,7 +87,7 @@
'skia_angle%': 0,
'skia_directwrite%': 0,
'skia_gpu%': 1,
- 'skia_osx_sdkroot%': 'macosx',
+ 'skia_osx_sdkroot%': '',
'skia_profile_enabled%': 0,
# Note: This is currently only turned on for linux and android.
# TODO: Turn on for Win and Mac as well.