blob: 0846fef7b3af98327344c8a581e38b6fc8bf6c89 [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',
commit-bot@chromium.org4b413c82013-11-25 19:44:07 +000018 'SK_SCALAR_TO_FLOAT_EXCLUDED', # temporary to allow Chrome to call SkFloatToScalar
bungeman@google.com97efada2012-07-30 20:40:50 +000019 ],
epoger@google.com5351b372011-07-01 17:16:26 +000020
epoger@google.com8846cb22011-07-01 20:20:07 +000021 # 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.com5351b372011-07-01 17:16:26 +000024 'variables': {
epoger@google.com8846cb22011-07-01 20:20:07 +000025 'conditions': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000026 [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \
borenet@google.com5bbf1d52013-06-24 19:31:58 +000027 (skia_os == "nacl" and OS == "linux") or \
28 (skia_os == "chromeos" and OS == "linux"))', {
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 }],
34 [ 'skia_angle and not skia_os == "win"', {
35 'error': '<!(skia_angle=1 only supported with skia_os="win".)',
36 }],
37 [ 'skia_arch_width != 32 and skia_arch_width != 64', {
38 'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)',
39 }],
40 [ 'skia_os == "nacl" and OS != "linux"', {
41 'error': '<!(Skia NaCl build only currently supported on Linux.)',
djsollen@google.come341cb32012-06-28 16:08:05 +000042 }],
borenet@google.com05d550e2013-06-11 15:52:19 +000043 [ 'skia_os == "chromeos" and OS != "linux"', {
44 'error': '<!(Skia ChromeOS build is only supported on Linux.)',
45 }],
epoger@google.com8846cb22011-07-01 20:20:07 +000046 ],
epoger@google.com5351b372011-07-01 17:16:26 +000047 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000048 'includes': [
epoger@google.com573e8ba2012-03-16 18:28:24 +000049 'common_conditions.gypi',
seanpaul@google.com1134f982011-09-15 14:24:33 +000050 ],
51 'conditions': [
52 [ 'skia_scalar == "float"',
53 {
54 'defines': [
55 'SK_SCALAR_IS_FLOAT',
56 'SK_CAN_USE_FLOAT',
57 ],
58 }, { # else, skia_scalar != "float"
59 'defines': [
60 'SK_SCALAR_IS_FIXED',
61 'SK_CAN_USE_FLOAT', # we can still use floats along the way
62 ],
63 }
64 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +000065 [ 'skia_mesa', {
66 'defines': [
67 'SK_MESA',
68 ],
69 'direct_dependent_settings': {
70 'defines': [
71 'SK_MESA',
72 ],
73 },
74 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +000075 [ 'skia_angle', {
76 'defines': [
77 'SK_ANGLE',
78 ],
79 'direct_dependent_settings': {
80 'defines': [
81 'SK_ANGLE',
82 ],
83 },
84 }],
edisonn@google.com184487c2013-03-08 18:00:16 +000085 [ 'skia_win_debuggers_path and skia_os == "win"',
86 {
87 'defines': [
88 'SK_USE_CDB',
89 ],
90 },
91 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +000092 [ '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': {
97 'Debug': {
98 'defines': [
99 'SK_DEBUG',
100 'SK_DEVELOPER=1',
101 ],
102 },
103 'Release': {
104 'defines': [
105 'SK_RELEASE',
106 ],
107 },
108 'Release_Developer': {
109 'inherit_from': ['Release'],
110 'defines': [
111 'SK_DEVELOPER=1',
112 ],
113 },
114 },
115 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000116 ],
epoger@google.com5351b372011-07-01 17:16:26 +0000117 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000118}