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': [ |
commit-bot@chromium.org | d70fa20 | 2014-04-24 21:51:58 +0000 | [diff] [blame] | 15 | 'SK_INTERNAL', |
bungeman@google.com | 97efada | 2012-07-30 20:40:50 +0000 | [diff] [blame] | 16 | 'SK_GAMMA_APPLY_TO_A8', |
robertphillips | 9ea8acd | 2016-03-01 09:34:38 -0800 | [diff] [blame] | 17 | 'QT_NO_KEYWORDS', |
mtklein | 8d7f5c3 | 2016-08-01 09:22:12 -0700 | [diff] [blame] | 18 | # The discardable resource cache is tested via a special bot. This is |
robertphillips | ff65952 | 2016-03-25 09:48:45 -0700 | [diff] [blame] | 19 | # disabled here so we test the non-discardable use case. |
| 20 | # 'SK_USE_DISCARDABLE_SCALEDIMAGECACHE', |
bungeman@google.com | 97efada | 2012-07-30 20:40:50 +0000 | [diff] [blame] | 21 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 22 | |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 23 | # Validate the 'skia_os' setting against 'OS', because only certain |
| 24 | # combinations work. You should only override 'skia_os' for certain |
| 25 | # situations, like building for iOS on a Mac. |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 26 | 'variables': { |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 27 | 'conditions': [ |
borenet | 43bf511 | 2016-04-29 14:01:34 -0700 | [diff] [blame] | 28 | [ 'skia_os != OS and not (skia_os == "ios" and OS == "mac")', { |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 29 | 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))', |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 30 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 31 | [ 'skia_mesa and skia_os not in ["mac", "linux"]', { |
| 32 | 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)', |
| 33 | }], |
hendrikw | 9a74041 | 2015-10-28 08:42:29 -0700 | [diff] [blame] | 34 | [ 'skia_angle and not (skia_os == "win" or skia_os == "linux" or skia_os == "mac")', { |
| 35 | 'error': '<!(skia_angle=1 only supported with skia_os="win" or skia_os="linux" or skia_os="mac".)', |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 36 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 37 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 38 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 39 | 'includes': [ |
epoger@google.com | 573e8ba | 2012-03-16 18:28:24 +0000 | [diff] [blame] | 40 | 'common_conditions.gypi', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 41 | ], |
| 42 | 'conditions': [ |
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 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 53 | [ 'skia_angle', { |
| 54 | 'defines': [ |
| 55 | 'SK_ANGLE', |
| 56 | ], |
| 57 | 'direct_dependent_settings': { |
| 58 | 'defines': [ |
| 59 | 'SK_ANGLE', |
| 60 | ], |
| 61 | }, |
| 62 | }], |
jvanverth | 65bd7ae | 2015-08-12 12:58:13 -0700 | [diff] [blame] | 63 | [ 'skia_vulkan', { |
| 64 | 'defines': [ |
| 65 | 'SK_VULKAN', |
| 66 | ], |
| 67 | 'direct_dependent_settings': { |
| 68 | 'defines': [ |
| 69 | 'SK_VULKAN', |
| 70 | ], |
| 71 | }, |
egdaniel | 735109c | 2016-07-27 08:03:57 -0700 | [diff] [blame] | 72 | 'conditions': [ |
| 73 | [ 'skia_vulkan_debug_layers', { |
| 74 | 'configurations': { |
| 75 | 'Debug': { 'defines': [ 'SK_ENABLE_VK_LAYERS' ] }, |
| 76 | }, |
| 77 | }], |
| 78 | ], |
jvanverth | 65bd7ae | 2015-08-12 12:58:13 -0700 | [diff] [blame] | 79 | }], |
edisonn@google.com | 184487c | 2013-03-08 18:00:16 +0000 | [diff] [blame] | 80 | [ 'skia_win_debuggers_path and skia_os == "win"', |
| 81 | { |
| 82 | 'defines': [ |
| 83 | 'SK_USE_CDB', |
| 84 | ], |
| 85 | }, |
| 86 | ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 87 | [ 'skia_android_framework==0', { |
| 88 | # These defines are not used for skia_android_framework, where we build |
| 89 | # one makefile and allow someone to add SK_DEBUG etc for their own |
| 90 | # debugging purposes. |
| 91 | 'configurations': { |
djsollen | efe46d2 | 2016-04-29 06:41:35 -0700 | [diff] [blame] | 92 | 'Debug': { 'defines': [ 'SK_DEBUG=1' ] }, |
mtklein | 753b870 | 2014-08-20 07:38:46 -0700 | [diff] [blame] | 93 | 'Release': { 'defines': [ 'NDEBUG' ] }, |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 94 | 'Release_Developer': { |
| 95 | 'inherit_from': ['Release'], |
djsollen | efe46d2 | 2016-04-29 06:41:35 -0700 | [diff] [blame] | 96 | 'defines': [ 'SK_DEBUG=1' ], |
djsollen | 2f12463 | 2016-04-29 13:53:05 -0700 | [diff] [blame] | 97 | 'conditions': [ |
| 98 | [ 'skia_clang_build == 0', { |
| 99 | # gcc has problems providing useful warnings of these types for |
| 100 | # optimized builds. |
| 101 | 'cflags': [ |
djsollen | aad1f8f | 2016-05-02 06:06:02 -0700 | [diff] [blame] | 102 | '-Wno-array-bounds', |
djsollen | 2f12463 | 2016-04-29 13:53:05 -0700 | [diff] [blame] | 103 | '-Wno-maybe-uninitialized', |
| 104 | '-Wno-strict-overflow', |
| 105 | ], |
| 106 | }], |
| 107 | ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 108 | }, |
| 109 | }, |
| 110 | }], |
vjiaoblack | 95302da | 2016-07-21 10:25:54 -0700 | [diff] [blame] | 111 | [ 'skia_experimental_shadowing', |
| 112 | { |
| 113 | 'defines': [ |
| 114 | 'SK_EXPERIMENTAL_SHADOWING', |
| 115 | ], |
| 116 | }, |
| 117 | ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 118 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 119 | }, # end 'target_defaults' |
senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 120 | } |