blob: a072798d44fa973164470ccb51706daa88a6bd0a [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_APPLY_TO_A8',
robertphillips9ea8acd2016-03-01 09:34:38 -080017 'QT_NO_KEYWORDS',
mtklein8d7f5c32016-08-01 09:22:12 -070018 # The discardable resource cache is tested via a special bot. This is
robertphillipsff659522016-03-25 09:48:45 -070019 # disabled here so we test the non-discardable use case.
20 # 'SK_USE_DISCARDABLE_SCALEDIMAGECACHE',
bungeman@google.com97efada2012-07-30 20:40:50 +000021 ],
epoger@google.com5351b372011-07-01 17:16:26 +000022
epoger@google.com8846cb22011-07-01 20:20:07 +000023 # 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.com5351b372011-07-01 17:16:26 +000026 'variables': {
epoger@google.com8846cb22011-07-01 20:20:07 +000027 'conditions': [
borenet43bf5112016-04-29 14:01:34 -070028 [ 'skia_os != OS and not (skia_os == "ios" and OS == "mac")', {
borenet@google.com7158e6a2012-11-01 17:43:44 +000029 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))',
robertphillips@google.com021bce92012-04-02 20:42:26 +000030 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +000031 [ 'skia_mesa and skia_os not in ["mac", "linux"]', {
32 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)',
33 }],
hendrikw9a740412015-10-28 08:42:29 -070034 [ '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.com7158e6a2012-11-01 17:43:44 +000036 }],
epoger@google.com8846cb22011-07-01 20:20:07 +000037 ],
epoger@google.com5351b372011-07-01 17:16:26 +000038 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000039 'includes': [
epoger@google.com573e8ba2012-03-16 18:28:24 +000040 'common_conditions.gypi',
seanpaul@google.com1134f982011-09-15 14:24:33 +000041 ],
42 'conditions': [
bsalomon@google.com373a6632011-10-19 20:43:20 +000043 [ 'skia_mesa', {
44 'defines': [
45 'SK_MESA',
46 ],
47 'direct_dependent_settings': {
48 'defines': [
49 'SK_MESA',
50 ],
51 },
52 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +000053 [ 'skia_angle', {
54 'defines': [
55 'SK_ANGLE',
56 ],
57 'direct_dependent_settings': {
58 'defines': [
59 'SK_ANGLE',
60 ],
61 },
62 }],
jvanverth65bd7ae2015-08-12 12:58:13 -070063 [ 'skia_vulkan', {
64 'defines': [
65 'SK_VULKAN',
66 ],
67 'direct_dependent_settings': {
68 'defines': [
69 'SK_VULKAN',
70 ],
71 },
egdaniel735109c2016-07-27 08:03:57 -070072 'conditions': [
73 [ 'skia_vulkan_debug_layers', {
74 'configurations': {
75 'Debug': { 'defines': [ 'SK_ENABLE_VK_LAYERS' ] },
76 },
77 }],
78 ],
jvanverth65bd7ae2015-08-12 12:58:13 -070079 }],
edisonn@google.com184487c2013-03-08 18:00:16 +000080 [ 'skia_win_debuggers_path and skia_os == "win"',
81 {
82 'defines': [
83 'SK_USE_CDB',
84 ],
85 },
86 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +000087 [ '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': {
djsollenefe46d22016-04-29 06:41:35 -070092 'Debug': { 'defines': [ 'SK_DEBUG=1' ] },
mtklein753b8702014-08-20 07:38:46 -070093 'Release': { 'defines': [ 'NDEBUG' ] },
scroggo@google.comd4adfa32014-02-05 16:35:12 +000094 'Release_Developer': {
95 'inherit_from': ['Release'],
djsollenefe46d22016-04-29 06:41:35 -070096 'defines': [ 'SK_DEBUG=1' ],
djsollen2f124632016-04-29 13:53:05 -070097 'conditions': [
98 [ 'skia_clang_build == 0', {
99 # gcc has problems providing useful warnings of these types for
100 # optimized builds.
101 'cflags': [
djsollenaad1f8f2016-05-02 06:06:02 -0700102 '-Wno-array-bounds',
djsollen2f124632016-04-29 13:53:05 -0700103 '-Wno-maybe-uninitialized',
104 '-Wno-strict-overflow',
105 ],
106 }],
107 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000108 },
109 },
110 }],
vjiaoblack95302da2016-07-21 10:25:54 -0700111 [ 'skia_experimental_shadowing',
112 {
113 'defines': [
114 'SK_EXPERIMENTAL_SHADOWING',
115 ],
116 },
117 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000118 ],
epoger@google.com5351b372011-07-01 17:16:26 +0000119 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000120}