blob: 06db4a8823575e76ab66eb7aa416d8fa94b5da7d [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 }],
djsollen@google.com7f562ad2012-06-28 16:19:03 +000027 ['skia_arch_width != 32 and skia_arch_width != 64',
djsollen@google.come341cb32012-06-28 16:08:05 +000028 {'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)'
29 }],
epoger@google.com8846cb22011-07-01 20:20:07 +000030 ],
epoger@google.com5351b372011-07-01 17:16:26 +000031 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000032 'includes': [
epoger@google.com573e8ba2012-03-16 18:28:24 +000033 'common_conditions.gypi',
seanpaul@google.com1134f982011-09-15 14:24:33 +000034 ],
35 'conditions': [
36 [ 'skia_scalar == "float"',
37 {
38 'defines': [
39 'SK_SCALAR_IS_FLOAT',
40 'SK_CAN_USE_FLOAT',
41 ],
42 }, { # else, skia_scalar != "float"
43 'defines': [
44 'SK_SCALAR_IS_FIXED',
45 'SK_CAN_USE_FLOAT', # we can still use floats along the way
46 ],
47 }
48 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +000049 [ 'skia_mesa', {
50 'defines': [
51 'SK_MESA',
52 ],
53 'direct_dependent_settings': {
54 'defines': [
55 'SK_MESA',
56 ],
57 },
58 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +000059 [ 'skia_angle', {
60 'defines': [
61 'SK_ANGLE',
62 ],
63 'direct_dependent_settings': {
64 'defines': [
65 'SK_ANGLE',
66 ],
67 },
68 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +000069 ],
epoger@google.com5351b372011-07-01 17:16:26 +000070 'configurations': {
71 'Debug': {
72 'defines': [
73 'SK_DEBUG',
robertphillips@google.comb74af872012-06-27 19:41:42 +000074 'SK_ENABLE_INST_COUNT',
epoger@google.com5351b372011-07-01 17:16:26 +000075 'GR_DEBUG=1',
76 ],
77 },
78 'Release': {
79 'defines': [
80 'SK_RELEASE',
81 'GR_RELEASE=1',
82 ],
83 },
84 },
epoger@google.com5351b372011-07-01 17:16:26 +000085 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +000086}
87# Local Variables:
88# tab-width:2
89# indent-tabs-mode:nil
90# End:
91# vim: set expandtab tabstop=2 shiftwidth=2: