blob: ad684c2629441afab6e111c597d53888bd6d9920 [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".)'}],
epoger@google.com8846cb22011-07-01 20:20:07 +000024 ],
epoger@google.com5351b372011-07-01 17:16:26 +000025 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000026 'includes': [
epoger@google.com573e8ba2012-03-16 18:28:24 +000027 'common_conditions.gypi',
seanpaul@google.com1134f982011-09-15 14:24:33 +000028 ],
29 'conditions': [
30 [ 'skia_scalar == "float"',
31 {
32 'defines': [
33 'SK_SCALAR_IS_FLOAT',
34 'SK_CAN_USE_FLOAT',
35 ],
36 }, { # else, skia_scalar != "float"
37 'defines': [
38 'SK_SCALAR_IS_FIXED',
39 'SK_CAN_USE_FLOAT', # we can still use floats along the way
40 ],
41 }
42 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +000043 [ 'skia_mesa', {
44 'defines': [
45 'SK_MESA',
46 ],
47 'direct_dependent_settings': {
48 'defines': [
49 'SK_MESA',
50 ],
51 },
52 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +000053 ],
epoger@google.com5351b372011-07-01 17:16:26 +000054 'configurations': {
55 'Debug': {
56 'defines': [
57 'SK_DEBUG',
58 'GR_DEBUG=1',
59 ],
60 },
61 'Release': {
62 'defines': [
63 'SK_RELEASE',
64 'GR_RELEASE=1',
65 ],
66 },
67 },
epoger@google.com5351b372011-07-01 17:16:26 +000068 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +000069}
70# Local Variables:
71# tab-width:2
72# indent-tabs-mode:nil
73# End:
74# vim: set expandtab tabstop=2 shiftwidth=2: