blob: a0a8105355504f416054cee185d987c038ab26ce [file] [log] [blame]
epoger@google.comfd03db02011-07-28 14:24:55 +00001# Copyright 2011 The Android Open Source Project
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +00002#
epoger@google.comfd03db02011-07-28 14:24:55 +00003# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
epoger@google.comaa3b6a92012-03-16 13:52:49 +00005#
6# This file is automatically included by gyp_skia when building any target.
7
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +00008{
epoger@google.com573e8ba2012-03-16 18:28:24 +00009 'includes': [
10 'common_variables.gypi',
11 ],
epoger@google.comaa3b6a92012-03-16 13:52:49 +000012
epoger@google.com5351b372011-07-01 17:16:26 +000013 'target_defaults': {
bungeman@google.com97efada2012-07-30 20:40:50 +000014 'defines': [
commit-bot@chromium.orgd70fa202014-04-24 21:51:58 +000015 'SK_INTERNAL',
bungeman@google.com97efada2012-07-30 20:40:50 +000016 'SK_GAMMA_SRGB',
17 'SK_GAMMA_APPLY_TO_A8',
robertphillips9ea8acd2016-03-01 09:34:38 -080018 'QT_NO_KEYWORDS',
robertphillipsff659522016-03-25 09:48:45 -070019 # 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.com97efada2012-07-30 20:40:50 +000022 ],
epoger@google.com5351b372011-07-01 17:16:26 +000023
epoger@google.com8846cb22011-07-01 20:20:07 +000024 # 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.com5351b372011-07-01 17:16:26 +000027 'variables': {
epoger@google.com8846cb22011-07-01 20:20:07 +000028 'conditions': [
borenet43bf5112016-04-29 14:01:34 -070029 [ 'skia_os != OS and not (skia_os == "ios" and OS == "mac")', {
borenet@google.com7158e6a2012-11-01 17:43:44 +000030 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))',
robertphillips@google.com021bce92012-04-02 20:42:26 +000031 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +000032 [ 'skia_mesa and skia_os not in ["mac", "linux"]', {
33 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)',
34 }],
hendrikw9a740412015-10-28 08:42:29 -070035 [ '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.com7158e6a2012-11-01 17:43:44 +000037 }],
epoger@google.com8846cb22011-07-01 20:20:07 +000038 ],
epoger@google.com5351b372011-07-01 17:16:26 +000039 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000040 'includes': [
epoger@google.com573e8ba2012-03-16 18:28:24 +000041 'common_conditions.gypi',
seanpaul@google.com1134f982011-09-15 14:24:33 +000042 ],
43 'conditions': [
bsalomon@google.com373a6632011-10-19 20:43:20 +000044 [ 'skia_mesa', {
45 'defines': [
46 'SK_MESA',
47 ],
48 'direct_dependent_settings': {
49 'defines': [
50 'SK_MESA',
51 ],
52 },
53 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +000054 [ 'skia_angle', {
55 'defines': [
56 'SK_ANGLE',
57 ],
58 'direct_dependent_settings': {
59 'defines': [
60 'SK_ANGLE',
61 ],
62 },
63 }],
jvanverth65bd7ae2015-08-12 12:58:13 -070064 [ 'skia_vulkan', {
65 'defines': [
66 'SK_VULKAN',
67 ],
68 'direct_dependent_settings': {
69 'defines': [
70 'SK_VULKAN',
71 ],
72 },
73 }],
hendrikw885bf092015-08-27 10:38:39 -070074 [ '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.com184487c2013-03-08 18:00:16 +000084 [ 'skia_win_debuggers_path and skia_os == "win"',
85 {
86 'defines': [
87 'SK_USE_CDB',
88 ],
89 },
90 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +000091 [ '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': {
djsollenefe46d22016-04-29 06:41:35 -070096 'Debug': { 'defines': [ 'SK_DEBUG=1' ] },
mtklein753b8702014-08-20 07:38:46 -070097 'Release': { 'defines': [ 'NDEBUG' ] },
scroggo@google.comd4adfa32014-02-05 16:35:12 +000098 'Release_Developer': {
99 'inherit_from': ['Release'],
djsollenefe46d22016-04-29 06:41:35 -0700100 'defines': [ 'SK_DEBUG=1' ],
djsollen2f124632016-04-29 13:53:05 -0700101 'conditions': [
102 [ 'skia_clang_build == 0', {
103 # gcc has problems providing useful warnings of these types for
104 # optimized builds.
105 'cflags': [
djsollenaad1f8f2016-05-02 06:06:02 -0700106 '-Wno-array-bounds',
djsollen2f124632016-04-29 13:53:05 -0700107 '-Wno-maybe-uninitialized',
108 '-Wno-strict-overflow',
109 ],
110 }],
111 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000112 },
113 },
114 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000115 ],
epoger@google.com5351b372011-07-01 17:16:26 +0000116 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000117}