blob: 2173d909d860160e84da313c60f4b7a67ff5f9b9 [file] [log] [blame]
epoger@google.comcb1809d2011-07-28 14:24:55 +00001# Copyright 2011 The Android Open Source Project
senorblanco@chromium.org6b19c9d2011-04-11 15:59:47 +00002#
epoger@google.comcb1809d2011-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.comfc79bcf2012-03-16 13:52:49 +00005#
6# This file is automatically included by gyp_skia when building any target.
7
senorblanco@chromium.org6b19c9d2011-04-11 15:59:47 +00008{
epoger@google.comac44a112012-03-16 18:28:24 +00009 'includes': [
10 'common_variables.gypi',
11 ],
epoger@google.comfc79bcf2012-03-16 13:52:49 +000012
epoger@google.com27b9aa02011-07-01 17:16:26 +000013 'target_defaults': {
bungeman@google.comd26da0f2012-07-30 20:40:50 +000014 'defines': [
15 'SK_GAMMA_SRGB',
16 'SK_GAMMA_APPLY_TO_A8',
17 ],
epoger@google.com27b9aa02011-07-01 17:16:26 +000018
epoger@google.com95185842011-07-01 20:20:07 +000019 # Validate the 'skia_os' setting against 'OS', because only certain
20 # combinations work. You should only override 'skia_os' for certain
21 # situations, like building for iOS on a Mac.
epoger@google.com27b9aa02011-07-01 17:16:26 +000022 'variables': {
epoger@google.com95185842011-07-01 20:20:07 +000023 'conditions': [
borenet@google.coma50f02d2012-11-01 17:43:44 +000024 [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \
borenet@google.coma37023f2013-06-24 19:31:58 +000025 (skia_os == "nacl" and OS == "linux") or \
26 (skia_os == "chromeos" and OS == "linux"))', {
borenet@google.coma50f02d2012-11-01 17:43:44 +000027 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))',
robertphillips@google.com9e0afa82012-04-02 20:42:26 +000028 }],
borenet@google.coma50f02d2012-11-01 17:43:44 +000029 [ 'skia_mesa and skia_os not in ["mac", "linux"]', {
30 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)',
31 }],
32 [ 'skia_angle and not skia_os == "win"', {
33 'error': '<!(skia_angle=1 only supported with skia_os="win".)',
34 }],
35 [ 'skia_arch_width != 32 and skia_arch_width != 64', {
36 'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)',
37 }],
38 [ 'skia_os == "nacl" and OS != "linux"', {
39 'error': '<!(Skia NaCl build only currently supported on Linux.)',
djsollen@google.com9262c042012-06-28 16:08:05 +000040 }],
borenet@google.com881ed1e2013-06-11 15:52:19 +000041 [ 'skia_os == "chromeos" and OS != "linux"', {
42 'error': '<!(Skia ChromeOS build is only supported on Linux.)',
43 }],
epoger@google.com95185842011-07-01 20:20:07 +000044 ],
epoger@google.com27b9aa02011-07-01 17:16:26 +000045 },
seanpaul@google.comeac08c82011-09-15 14:24:33 +000046 'includes': [
epoger@google.comac44a112012-03-16 18:28:24 +000047 'common_conditions.gypi',
seanpaul@google.comeac08c82011-09-15 14:24:33 +000048 ],
49 'conditions': [
50 [ 'skia_scalar == "float"',
51 {
52 'defines': [
53 'SK_SCALAR_IS_FLOAT',
54 'SK_CAN_USE_FLOAT',
55 ],
56 }, { # else, skia_scalar != "float"
57 'defines': [
58 'SK_SCALAR_IS_FIXED',
59 'SK_CAN_USE_FLOAT', # we can still use floats along the way
60 ],
61 }
62 ],
bsalomon@google.com54ca6fd2011-10-19 20:43:20 +000063 [ 'skia_mesa', {
64 'defines': [
65 'SK_MESA',
66 ],
67 'direct_dependent_settings': {
68 'defines': [
69 'SK_MESA',
70 ],
71 },
72 }],
robertphillips@google.com9e0afa82012-04-02 20:42:26 +000073 [ 'skia_angle', {
74 'defines': [
75 'SK_ANGLE',
76 ],
77 'direct_dependent_settings': {
78 'defines': [
79 'SK_ANGLE',
80 ],
81 },
82 }],
edisonn@google.coma1a976b2013-03-08 18:00:16 +000083 [ 'skia_win_debuggers_path and skia_os == "win"',
84 {
85 'defines': [
86 'SK_USE_CDB',
87 ],
88 },
89 ],
seanpaul@google.comeac08c82011-09-15 14:24:33 +000090 ],
epoger@google.com27b9aa02011-07-01 17:16:26 +000091 'configurations': {
92 'Debug': {
93 'defines': [
94 'SK_DEBUG',
95 'GR_DEBUG=1',
humper@google.com72288f42013-01-14 18:49:19 +000096 'SK_DEVELOPER=1',
epoger@google.com27b9aa02011-07-01 17:16:26 +000097 ],
98 },
99 'Release': {
100 'defines': [
101 'SK_RELEASE',
102 'GR_RELEASE=1',
103 ],
104 },
humper@google.com72288f42013-01-14 18:49:19 +0000105 'Release_Developer': {
106 'inherit_from': ['Release'],
107 'defines': [
108 'SK_DEVELOPER=1',
109 ],
110 },
epoger@google.com27b9aa02011-07-01 17:16:26 +0000111 },
epoger@google.com27b9aa02011-07-01 17:16:26 +0000112 }, # end 'target_defaults'
senorblanco@chromium.org6b19c9d2011-04-11 15:59:47 +0000113}
114# Local Variables:
115# tab-width:2
116# indent-tabs-mode:nil
117# End:
118# vim: set expandtab tabstop=2 shiftwidth=2: