epoger@google.com | fd03db0 | 2011-07-28 14:24:55 +0000 | [diff] [blame] | 1 | # Copyright 2011 The Android Open Source Project |
senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 2 | # |
epoger@google.com | fd03db0 | 2011-07-28 14:24:55 +0000 | [diff] [blame] | 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
epoger@google.com | aa3b6a9 | 2012-03-16 13:52:49 +0000 | [diff] [blame] | 5 | # |
| 6 | # This file is automatically included by gyp_skia when building any target. |
| 7 | |
senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 8 | { |
epoger@google.com | 573e8ba | 2012-03-16 18:28:24 +0000 | [diff] [blame] | 9 | 'includes': [ |
| 10 | 'common_variables.gypi', |
| 11 | ], |
epoger@google.com | aa3b6a9 | 2012-03-16 13:52:49 +0000 | [diff] [blame] | 12 | |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 13 | 'target_defaults': { |
| 14 | |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 15 | # Validate the 'skia_os' setting against 'OS', because only certain |
| 16 | # combinations work. You should only override 'skia_os' for certain |
| 17 | # situations, like building for iOS on a Mac. |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 18 | 'variables': { |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 19 | 'conditions': [ |
| 20 | ['skia_os != OS and not (skia_os == "ios" and OS == "mac")', |
| 21 | {'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))'}], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 22 | ['skia_mesa and skia_os not in ["mac", "linux"]', |
| 23 | {'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)'}], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 24 | ['skia_angle and not skia_os == "win"', |
| 25 | {'error': '<!(skia_angle=1 only supported with skia_os="win".)' |
| 26 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 27 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 28 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 29 | 'includes': [ |
epoger@google.com | 573e8ba | 2012-03-16 18:28:24 +0000 | [diff] [blame] | 30 | 'common_conditions.gypi', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 31 | ], |
| 32 | 'conditions': [ |
| 33 | [ 'skia_scalar == "float"', |
| 34 | { |
| 35 | 'defines': [ |
| 36 | 'SK_SCALAR_IS_FLOAT', |
| 37 | 'SK_CAN_USE_FLOAT', |
| 38 | ], |
| 39 | }, { # else, skia_scalar != "float" |
| 40 | 'defines': [ |
| 41 | 'SK_SCALAR_IS_FIXED', |
| 42 | 'SK_CAN_USE_FLOAT', # we can still use floats along the way |
| 43 | ], |
| 44 | } |
| 45 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 46 | [ 'skia_mesa', { |
| 47 | 'defines': [ |
| 48 | 'SK_MESA', |
| 49 | ], |
| 50 | 'direct_dependent_settings': { |
| 51 | 'defines': [ |
| 52 | 'SK_MESA', |
| 53 | ], |
| 54 | }, |
| 55 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 56 | [ 'skia_angle', { |
| 57 | 'defines': [ |
| 58 | 'SK_ANGLE', |
| 59 | ], |
| 60 | 'direct_dependent_settings': { |
| 61 | 'defines': [ |
| 62 | 'SK_ANGLE', |
| 63 | ], |
| 64 | }, |
| 65 | }], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 66 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 67 | 'configurations': { |
| 68 | 'Debug': { |
| 69 | 'defines': [ |
| 70 | 'SK_DEBUG', |
| 71 | 'GR_DEBUG=1', |
| 72 | ], |
| 73 | }, |
| 74 | 'Release': { |
| 75 | 'defines': [ |
| 76 | 'SK_RELEASE', |
| 77 | 'GR_RELEASE=1', |
| 78 | ], |
| 79 | }, |
| 80 | }, |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 81 | }, # end 'target_defaults' |
senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 82 | } |
| 83 | # Local Variables: |
| 84 | # tab-width:2 |
| 85 | # indent-tabs-mode:nil |
| 86 | # End: |
| 87 | # vim: set expandtab tabstop=2 shiftwidth=2: |