summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 00:55:36 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 00:55:36 +0000
commitfca3d81d7a3547c55caabc9b33e56fae690ab797 (patch)
tree941c79ed94fa4976c780fb586eb639a1125a7f6f /build/common.gypi
parentd2de410018829a60678e4e420967fca2bee8aa29 (diff)
downloadchromium_src-fca3d81d7a3547c55caabc9b33e56fae690ab797.zip
chromium_src-fca3d81d7a3547c55caabc9b33e56fae690ab797.tar.gz
chromium_src-fca3d81d7a3547c55caabc9b33e56fae690ab797.tar.bz2
Allow the mac_sdk_path GYP variable to set the Mac OS X SDK by path.
This is useful for cases where Xcode doesn't know about the SDK, possibly because the SDK is installed outside of Xcode altogether. For example, Xcode 4.4 does not include a copy of the 10.6 SDK, so if you have a copy of the 10.6 SDK present at /SDKs/MacOSX10.6.sdk, you can put this in ~/.gyp/include.gypi: { 'variables': { 'mac_sdk_path': '/SDKs/MacOSX10.6.sdk', }, } Review URL: https://chromiumcodereview.appspot.com/10831039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi27
1 files changed, 19 insertions, 8 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 5b38b23..97c896a3 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -642,8 +642,11 @@
# http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
# Chrome normally builds with the Mac OS X 10.6 SDK and sets the
# deployment target to 10.5. Other projects, such as O3D, may override
- # these defaults.
+ # these defaults. If the SDK is installed someplace that Xcode doesn't
+ # know about, set mac_sdk_path to the path to the SDK. If set to a
+ # non-empty string, mac_sdk_path will be used in preference to mac_sdk.
'mac_sdk%': '10.6',
+ 'mac_sdk_path%': '',
'mac_deployment_target%': '10.5',
# The default value for mac_strip in target_defaults. This cannot be
@@ -3296,18 +3299,26 @@
# custom xcode_settings in target_defaults to add them to targets instead.
'conditions': [
- ['OS=="mac"', {
- # In an Xcode Project Info window, the "Base SDK for All Configurations"
- # setting sets the SDK on a project-wide basis. In order to get the
- # configured SDK to show properly in the Xcode UI, SDKROOT must be set
- # here at the project level.
- 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
+ # In an Xcode Project Info window, the "Base SDK for All Configurations"
+ # setting sets the SDK on a project-wide basis. In order to get the
+ # configured SDK to show properly in the Xcode UI, SDKROOT must be set
+ # here at the project level.
+ ['mac_sdk_path==""', {
+ 'conditions': [
+ ['OS=="mac"', {
+ 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
+ }],
+ ['OS=="ios"', {
+ 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
+ }],
+ ],
+ }, { # else: mac_sdk_path!=""
+ 'SDKROOT': '<(mac_sdk_path)', # -isysroot
}],
['OS=="ios"', {
# Just build armv7 since iOS 4.3+ only supports armv7.
'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
- 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
# Target both iPhone and iPad.
'TARGETED_DEVICE_FAMILY': '1,2',
}],