blob: a9b274da483815f9f964e45144e461d8653d9b2f [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': {
14
epoger@google.com8846cb22011-07-01 20:20:07 +000015 # Validate the 'skia_os' setting against 'OS', because only certain
16 # combinations work. You should only override 'skia_os' for certain
17 # situations, like building for iOS on a Mac.
epoger@google.com5351b372011-07-01 17:16:26 +000018 'variables': {
epoger@google.com8846cb22011-07-01 20:20:07 +000019 'conditions': [
20 ['skia_os != OS and not (skia_os == "ios" and OS == "mac")',
21 {'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))'}],
bsalomon@google.com373a6632011-10-19 20:43:20 +000022 ['skia_mesa and skia_os not in ["mac", "linux"]',
23 {'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)'}],
robertphillips@google.com021bce92012-04-02 20:42:26 +000024 ['skia_angle and not skia_os == "win"',
25 {'error': '<!(skia_angle=1 only supported with skia_os="win".)'
26 }],
epoger@google.com8846cb22011-07-01 20:20:07 +000027 ],
epoger@google.com5351b372011-07-01 17:16:26 +000028 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000029 'includes': [
epoger@google.com573e8ba2012-03-16 18:28:24 +000030 'common_conditions.gypi',
seanpaul@google.com1134f982011-09-15 14:24:33 +000031 ],
32 'conditions': [
33 [ 'skia_scalar == "float"',
34 {
35 'defines': [
36 'SK_SCALAR_IS_FLOAT',
37 'SK_CAN_USE_FLOAT',
38 ],
39 }, { # else, skia_scalar != "float"
40 'defines': [
41 'SK_SCALAR_IS_FIXED',
42 'SK_CAN_USE_FLOAT', # we can still use floats along the way
43 ],
44 }
45 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +000046 [ 'skia_mesa', {
47 'defines': [
48 'SK_MESA',
49 ],
50 'direct_dependent_settings': {
51 'defines': [
52 'SK_MESA',
53 ],
54 },
55 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +000056 [ 'skia_angle', {
57 'defines': [
58 'SK_ANGLE',
59 ],
60 'direct_dependent_settings': {
61 'defines': [
62 'SK_ANGLE',
63 ],
64 },
65 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +000066 ],
epoger@google.com5351b372011-07-01 17:16:26 +000067 'configurations': {
68 'Debug': {
69 'defines': [
70 'SK_DEBUG',
71 'GR_DEBUG=1',
72 ],
73 },
74 'Release': {
75 'defines': [
76 'SK_RELEASE',
77 'GR_RELEASE=1',
78 ],
79 },
80 },
epoger@google.com5351b372011-07-01 17:16:26 +000081 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +000082}
83# Local Variables:
84# tab-width:2
85# indent-tabs-mode:nil
86# End:
87# vim: set expandtab tabstop=2 shiftwidth=2: