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".)'}], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 24 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 25 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 26 | 'includes': [ |
epoger@google.com | 573e8ba | 2012-03-16 18:28:24 +0000 | [diff] [blame] | 27 | 'common_conditions.gypi', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 28 | ], |
| 29 | 'conditions': [ |
| 30 | [ 'skia_scalar == "float"', |
| 31 | { |
| 32 | 'defines': [ |
| 33 | 'SK_SCALAR_IS_FLOAT', |
| 34 | 'SK_CAN_USE_FLOAT', |
| 35 | ], |
| 36 | }, { # else, skia_scalar != "float" |
| 37 | 'defines': [ |
| 38 | 'SK_SCALAR_IS_FIXED', |
| 39 | 'SK_CAN_USE_FLOAT', # we can still use floats along the way |
| 40 | ], |
| 41 | } |
| 42 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 43 | [ 'skia_mesa', { |
| 44 | 'defines': [ |
| 45 | 'SK_MESA', |
| 46 | ], |
| 47 | 'direct_dependent_settings': { |
| 48 | 'defines': [ |
| 49 | 'SK_MESA', |
| 50 | ], |
| 51 | }, |
| 52 | }], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 53 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 54 | 'configurations': { |
| 55 | 'Debug': { |
| 56 | 'defines': [ |
| 57 | 'SK_DEBUG', |
| 58 | 'GR_DEBUG=1', |
| 59 | ], |
| 60 | }, |
| 61 | 'Release': { |
| 62 | 'defines': [ |
| 63 | 'SK_RELEASE', |
| 64 | 'GR_RELEASE=1', |
| 65 | ], |
| 66 | }, |
| 67 | }, |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 68 | }, # end 'target_defaults' |
senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 69 | } |
| 70 | # Local Variables: |
| 71 | # tab-width:2 |
| 72 | # indent-tabs-mode:nil |
| 73 | # End: |
| 74 | # vim: set expandtab tabstop=2 shiftwidth=2: |