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': { |
bungeman@google.com | 97efada | 2012-07-30 20:40:50 +0000 | [diff] [blame] | 14 | 'defines': [ |
| 15 | 'SK_GAMMA_SRGB', |
| 16 | 'SK_GAMMA_APPLY_TO_A8', |
| 17 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 18 | |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 19 | # Validate the 'skia_os' setting against 'OS', because only certain |
| 20 | # combinations work. You should only override 'skia_os' for certain |
| 21 | # situations, like building for iOS on a Mac. |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 22 | 'variables': { |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 23 | 'conditions': [ |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 24 | [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \ |
| 25 | (skia_os == "nacl" and OS == "linux"))', { |
| 26 | 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))', |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 27 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 28 | [ 'skia_mesa and skia_os not in ["mac", "linux"]', { |
| 29 | 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)', |
| 30 | }], |
| 31 | [ 'skia_angle and not skia_os == "win"', { |
| 32 | 'error': '<!(skia_angle=1 only supported with skia_os="win".)', |
| 33 | }], |
| 34 | [ 'skia_arch_width != 32 and skia_arch_width != 64', { |
| 35 | 'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)', |
| 36 | }], |
| 37 | [ 'skia_os == "nacl" and OS != "linux"', { |
| 38 | 'error': '<!(Skia NaCl build only currently supported on Linux.)', |
djsollen@google.com | e341cb3 | 2012-06-28 16:08:05 +0000 | [diff] [blame] | 39 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 40 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 41 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 42 | 'includes': [ |
epoger@google.com | 573e8ba | 2012-03-16 18:28:24 +0000 | [diff] [blame] | 43 | 'common_conditions.gypi', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 44 | ], |
| 45 | 'conditions': [ |
| 46 | [ 'skia_scalar == "float"', |
| 47 | { |
| 48 | 'defines': [ |
| 49 | 'SK_SCALAR_IS_FLOAT', |
| 50 | 'SK_CAN_USE_FLOAT', |
| 51 | ], |
| 52 | }, { # else, skia_scalar != "float" |
| 53 | 'defines': [ |
| 54 | 'SK_SCALAR_IS_FIXED', |
| 55 | 'SK_CAN_USE_FLOAT', # we can still use floats along the way |
| 56 | ], |
| 57 | } |
| 58 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 59 | [ 'skia_mesa', { |
| 60 | 'defines': [ |
| 61 | 'SK_MESA', |
| 62 | ], |
| 63 | 'direct_dependent_settings': { |
| 64 | 'defines': [ |
| 65 | 'SK_MESA', |
| 66 | ], |
| 67 | }, |
| 68 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 69 | [ 'skia_angle', { |
| 70 | 'defines': [ |
| 71 | 'SK_ANGLE', |
| 72 | ], |
| 73 | 'direct_dependent_settings': { |
| 74 | 'defines': [ |
| 75 | 'SK_ANGLE', |
| 76 | ], |
| 77 | }, |
| 78 | }], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 79 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 80 | 'configurations': { |
| 81 | 'Debug': { |
| 82 | 'defines': [ |
| 83 | 'SK_DEBUG', |
| 84 | 'GR_DEBUG=1', |
humper@google.com | 7af56be | 2013-01-14 18:49:19 +0000 | [diff] [blame^] | 85 | 'SK_DEVELOPER=1', |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 86 | ], |
| 87 | }, |
| 88 | 'Release': { |
| 89 | 'defines': [ |
| 90 | 'SK_RELEASE', |
| 91 | 'GR_RELEASE=1', |
| 92 | ], |
| 93 | }, |
humper@google.com | 7af56be | 2013-01-14 18:49:19 +0000 | [diff] [blame^] | 94 | 'Release_Developer': { |
| 95 | 'inherit_from': ['Release'], |
| 96 | 'defines': [ |
| 97 | 'SK_DEVELOPER=1', |
| 98 | ], |
| 99 | }, |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 100 | }, |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 101 | }, # end 'target_defaults' |
senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 102 | } |
| 103 | # Local Variables: |
| 104 | # tab-width:2 |
| 105 | # indent-tabs-mode:nil |
| 106 | # End: |
| 107 | # vim: set expandtab tabstop=2 shiftwidth=2: |