blob: d55b7cc57c174b5cbbcf1771061fc5ac2217b97a [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': [
15 'SK_GAMMA_SRGB',
16 'SK_GAMMA_APPLY_TO_A8',
commit-bot@chromium.org4b413c82013-11-25 19:44:07 +000017 'SK_SCALAR_TO_FLOAT_EXCLUDED', # temporary to allow Chrome to call SkFloatToScalar
bungeman@google.com97efada2012-07-30 20:40:50 +000018 ],
epoger@google.com5351b372011-07-01 17:16:26 +000019
epoger@google.com8846cb22011-07-01 20:20:07 +000020 # Validate the 'skia_os' setting against 'OS', because only certain
21 # combinations work. You should only override 'skia_os' for certain
22 # situations, like building for iOS on a Mac.
epoger@google.com5351b372011-07-01 17:16:26 +000023 'variables': {
epoger@google.com8846cb22011-07-01 20:20:07 +000024 'conditions': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000025 [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \
borenet@google.com5bbf1d52013-06-24 19:31:58 +000026 (skia_os == "nacl" and OS == "linux") or \
27 (skia_os == "chromeos" and OS == "linux"))', {
borenet@google.com7158e6a2012-11-01 17:43:44 +000028 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))',
robertphillips@google.com021bce92012-04-02 20:42:26 +000029 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +000030 [ 'skia_mesa and skia_os not in ["mac", "linux"]', {
31 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)',
32 }],
33 [ 'skia_angle and not skia_os == "win"', {
34 'error': '<!(skia_angle=1 only supported with skia_os="win".)',
35 }],
36 [ 'skia_arch_width != 32 and skia_arch_width != 64', {
37 'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)',
38 }],
39 [ 'skia_os == "nacl" and OS != "linux"', {
40 'error': '<!(Skia NaCl build only currently supported on Linux.)',
djsollen@google.come341cb32012-06-28 16:08:05 +000041 }],
borenet@google.com05d550e2013-06-11 15:52:19 +000042 [ 'skia_os == "chromeos" and OS != "linux"', {
43 'error': '<!(Skia ChromeOS build is only supported on Linux.)',
44 }],
epoger@google.com8846cb22011-07-01 20:20:07 +000045 ],
epoger@google.com5351b372011-07-01 17:16:26 +000046 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000047 'includes': [
epoger@google.com573e8ba2012-03-16 18:28:24 +000048 'common_conditions.gypi',
seanpaul@google.com1134f982011-09-15 14:24:33 +000049 ],
50 'conditions': [
51 [ 'skia_scalar == "float"',
52 {
53 'defines': [
54 'SK_SCALAR_IS_FLOAT',
55 'SK_CAN_USE_FLOAT',
56 ],
57 }, { # else, skia_scalar != "float"
58 'defines': [
59 'SK_SCALAR_IS_FIXED',
60 'SK_CAN_USE_FLOAT', # we can still use floats along the way
61 ],
62 }
63 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +000064 [ 'skia_mesa', {
65 'defines': [
66 'SK_MESA',
67 ],
68 'direct_dependent_settings': {
69 'defines': [
70 'SK_MESA',
71 ],
72 },
73 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +000074 [ 'skia_angle', {
75 'defines': [
76 'SK_ANGLE',
77 ],
78 'direct_dependent_settings': {
79 'defines': [
80 'SK_ANGLE',
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 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +000091 ],
epoger@google.com5351b372011-07-01 17:16:26 +000092 'configurations': {
93 'Debug': {
94 'defines': [
95 'SK_DEBUG',
humper@google.com7af56be2013-01-14 18:49:19 +000096 'SK_DEVELOPER=1',
epoger@google.com5351b372011-07-01 17:16:26 +000097 ],
98 },
99 'Release': {
100 'defines': [
101 'SK_RELEASE',
epoger@google.com5351b372011-07-01 17:16:26 +0000102 ],
103 },
humper@google.com7af56be2013-01-14 18:49:19 +0000104 'Release_Developer': {
105 'inherit_from': ['Release'],
106 'defines': [
107 'SK_DEVELOPER=1',
108 ],
109 },
epoger@google.com5351b372011-07-01 17:16:26 +0000110 },
epoger@google.com5351b372011-07-01 17:16:26 +0000111 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000112}
113# Local Variables:
114# tab-width:2
115# indent-tabs-mode:nil
116# End:
117# vim: set expandtab tabstop=2 shiftwidth=2: