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