diff options
author | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-01 20:20:07 +0000 |
---|---|---|
committer | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-01 20:20:07 +0000 |
commit | 9518584daf848c80cc24b508e389017ff1bdf20d (patch) | |
tree | d563ae1434b1f3c44a1e8a2dba0c8f9379896cac /common.gypi | |
parent | 27b9aa07b3f847211402967a28ef5ef96e710240 (diff) | |
download | gyp-9518584daf848c80cc24b508e389017ff1bdf20d.tar.gz |
Create new 'skia_os' variable to replace use of 'OS' in most places.
http://codereview.appspot.com/4627085
git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@1782 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'common.gypi')
-rw-r--r-- | common.gypi | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/common.gypi b/common.gypi index d1f23d5..a9b0b53 100644 --- a/common.gypi +++ b/common.gypi @@ -12,13 +12,29 @@ # See the License for the specific language governing permissions and # limitations under the License. { + # Define all variables, allowing for override in GYP_DEFINES. + # + # One such variable is 'skia_os', which we use instead of 'OS' throughout + # our gyp files. We set it automatically based on 'OS', but allow the + # user to override it via GYP_DEFINES if they like. + 'variables': { + 'skia_scalar%': 'float', + 'skia_os%': '<(OS)', + }, + 'skia_scalar%': '<(skia_scalar)', + 'skia_os': '<(skia_os)', + 'target_defaults': { - # Define variables, and allow for override in GYP_DEFINES environment var. + # Validate the 'skia_os' setting against 'OS', because only certain + # combinations work. You should only override 'skia_os' for certain + # situations, like building for iOS on a Mac. 'variables': { - 'skia_scalar%': 'float', + 'conditions': [ + ['skia_os != OS and not (skia_os == "ios" and OS == "mac")', + {'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))'}], + ], }, - 'skia_scalar%': '<(skia_scalar)', 'configurations': { 'Debug': { @@ -51,7 +67,7 @@ } ], - ['OS == "win"', + ['skia_os == "win"', { 'defines': [ 'SK_BUILD_FOR_WIN32', @@ -101,7 +117,7 @@ }, ], - ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', + ['skia_os in ["linux", "freebsd", "openbsd", "solaris"]', { 'defines': [ 'SK_SAMPLES_FOR_X', @@ -122,7 +138,7 @@ }, ], - ['OS == "mac"', + ['skia_os == "mac"', { 'defines': [ 'SK_BUILD_FOR_MAC', |