blob: aa6e2769bc1829bde8be7a9d602190ef57086f45 [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.comaa3b6a92012-03-16 13:52:49 +00009 # Define all variables, allowing for override in GYP_DEFINES.
10 #
11 # One such variable is 'skia_os', which we use instead of 'OS' throughout
12 # our gyp files. We set it automatically based on 'OS', but allow the
13 # user to override it via GYP_DEFINES if they like.
14 'variables': {
15 'skia_scalar%': 'float',
16 'skia_os%': '<(OS)',
17 'skia_mesa%': 0,
18 'skia_target_arch%': 'x86',
19 },
20
epoger@google.com5351b372011-07-01 17:16:26 +000021 'target_defaults': {
22
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': [
28 ['skia_os != OS and not (skia_os == "ios" and OS == "mac")',
29 {'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))'}],
bsalomon@google.com373a6632011-10-19 20:43:20 +000030 ['skia_mesa and skia_os not in ["mac", "linux"]',
31 {'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)'}],
epoger@google.com8846cb22011-07-01 20:20:07 +000032 ],
epoger@google.com5351b372011-07-01 17:16:26 +000033 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000034 'includes': [
35 'common_conditions.gypi'
36 ],
37 'conditions': [
38 [ 'skia_scalar == "float"',
39 {
40 'defines': [
41 'SK_SCALAR_IS_FLOAT',
42 'SK_CAN_USE_FLOAT',
43 ],
44 }, { # else, skia_scalar != "float"
45 'defines': [
46 'SK_SCALAR_IS_FIXED',
47 'SK_CAN_USE_FLOAT', # we can still use floats along the way
48 ],
49 }
50 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +000051 [ 'skia_mesa', {
52 'defines': [
53 'SK_MESA',
54 ],
55 'direct_dependent_settings': {
56 'defines': [
57 'SK_MESA',
58 ],
59 },
60 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +000061 ],
epoger@google.com5351b372011-07-01 17:16:26 +000062 'configurations': {
63 'Debug': {
64 'defines': [
65 'SK_DEBUG',
66 'GR_DEBUG=1',
67 ],
68 },
69 'Release': {
70 'defines': [
71 'SK_RELEASE',
72 'GR_RELEASE=1',
73 ],
74 },
75 },
epoger@google.com5351b372011-07-01 17:16:26 +000076 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +000077}
78# Local Variables:
79# tab-width:2
80# indent-tabs-mode:nil
81# End:
82# vim: set expandtab tabstop=2 shiftwidth=2: