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', |
danakj | f58a562 | 2014-09-11 11:08:50 -0700 | [diff] [blame] | 18 | # 'SK_USE_DISCARDABLE_SCALEDIMAGECACHE', # TODO(reed): Re-enable when tests don't crash with this. |
bungeman@google.com | 97efada | 2012-07-30 20:40:50 +0000 | [diff] [blame] | 19 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 20 | |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 21 | # Validate the 'skia_os' setting against 'OS', because only certain |
| 22 | # combinations work. You should only override 'skia_os' for certain |
| 23 | # situations, like building for iOS on a Mac. |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 24 | 'variables': { |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 25 | 'conditions': [ |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 26 | [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \ |
borenet@google.com | 5bbf1d5 | 2013-06-24 19:31:58 +0000 | [diff] [blame] | 27 | (skia_os == "chromeos" and OS == "linux"))', { |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 28 | 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))', |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 29 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 30 | [ 'skia_mesa and skia_os not in ["mac", "linux"]', { |
| 31 | 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)', |
| 32 | }], |
hendrikw | 9a74041 | 2015-10-28 08:42:29 -0700 | [diff] [blame] | 33 | [ 'skia_angle and not (skia_os == "win" or skia_os == "linux" or skia_os == "mac")', { |
| 34 | '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] | 35 | }], |
borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 36 | [ 'skia_os == "chromeos" and OS != "linux"', { |
| 37 | 'error': '<!(Skia ChromeOS build is only supported on Linux.)', |
| 38 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 39 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 40 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 41 | 'includes': [ |
epoger@google.com | 573e8ba | 2012-03-16 18:28:24 +0000 | [diff] [blame] | 42 | 'common_conditions.gypi', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 43 | ], |
| 44 | 'conditions': [ |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 45 | [ 'skia_mesa', { |
| 46 | 'defines': [ |
| 47 | 'SK_MESA', |
| 48 | ], |
| 49 | 'direct_dependent_settings': { |
| 50 | 'defines': [ |
| 51 | 'SK_MESA', |
| 52 | ], |
| 53 | }, |
| 54 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 55 | [ 'skia_angle', { |
| 56 | 'defines': [ |
| 57 | 'SK_ANGLE', |
| 58 | ], |
| 59 | 'direct_dependent_settings': { |
| 60 | 'defines': [ |
| 61 | 'SK_ANGLE', |
| 62 | ], |
| 63 | }, |
| 64 | }], |
jvanverth | 65bd7ae | 2015-08-12 12:58:13 -0700 | [diff] [blame] | 65 | [ 'skia_vulkan', { |
| 66 | 'defines': [ |
| 67 | 'SK_VULKAN', |
| 68 | ], |
| 69 | 'direct_dependent_settings': { |
| 70 | 'defines': [ |
| 71 | 'SK_VULKAN', |
| 72 | ], |
| 73 | }, |
| 74 | }], |
hendrikw | 885bf09 | 2015-08-27 10:38:39 -0700 | [diff] [blame] | 75 | [ 'skia_command_buffer', { |
| 76 | 'defines': [ |
| 77 | 'SK_COMMAND_BUFFER', |
| 78 | ], |
| 79 | 'direct_dependent_settings': { |
| 80 | 'defines': [ |
| 81 | 'SK_COMMAND_BUFFER', |
| 82 | ], |
| 83 | }, |
| 84 | }], |
edisonn@google.com | 184487c | 2013-03-08 18:00:16 +0000 | [diff] [blame] | 85 | [ 'skia_win_debuggers_path and skia_os == "win"', |
| 86 | { |
| 87 | 'defines': [ |
| 88 | 'SK_USE_CDB', |
| 89 | ], |
| 90 | }, |
| 91 | ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 92 | [ 'skia_android_framework==0', { |
| 93 | # These defines are not used for skia_android_framework, where we build |
| 94 | # one makefile and allow someone to add SK_DEBUG etc for their own |
| 95 | # debugging purposes. |
| 96 | 'configurations': { |
mtklein | 753b870 | 2014-08-20 07:38:46 -0700 | [diff] [blame] | 97 | 'Debug': { 'defines': [ 'SK_DEVELOPER=1' ] }, |
| 98 | 'Release': { 'defines': [ 'NDEBUG' ] }, |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 99 | 'Release_Developer': { |
| 100 | 'inherit_from': ['Release'], |
mtklein | 753b870 | 2014-08-20 07:38:46 -0700 | [diff] [blame] | 101 | 'defines': [ 'SK_DEVELOPER=1' ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 102 | }, |
| 103 | }, |
| 104 | }], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 105 | ], |
epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame] | 106 | }, # end 'target_defaults' |
senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 107 | } |