1# Copyright 2011 The Android Open Source Project 2# 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5# 6# This file is automatically included by gyp_skia when building any target. 7 8{ 9 'includes': [ 10 'common_variables.gypi', 11 ], 12 13 'target_defaults': { 14 'defines': [ 15 'SK_INTERNAL', 16 'SK_GAMMA_SRGB', 17 'SK_GAMMA_APPLY_TO_A8', 18 'SK_SCALAR_TO_FLOAT_EXCLUDED', # temporary to allow Chrome to call SkFloatToScalar 19 ], 20 21 # Validate the 'skia_os' setting against 'OS', because only certain 22 # combinations work. You should only override 'skia_os' for certain 23 # situations, like building for iOS on a Mac. 24 'variables': { 25 'conditions': [ 26 [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \ 27 (skia_os == "nacl" and OS == "linux") or \ 28 (skia_os == "chromeos" and OS == "linux"))', { 29 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))', 30 }], 31 [ 'skia_mesa and skia_os not in ["mac", "linux"]', { 32 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)', 33 }], 34 [ 'skia_angle and not skia_os == "win"', { 35 'error': '<!(skia_angle=1 only supported with skia_os="win".)', 36 }], 37 [ 'skia_arch_width != 32 and skia_arch_width != 64', { 38 'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)', 39 }], 40 [ 'skia_os == "nacl" and OS != "linux"', { 41 'error': '<!(Skia NaCl build only currently supported on Linux.)', 42 }], 43 [ 'skia_os == "chromeos" and OS != "linux"', { 44 'error': '<!(Skia ChromeOS build is only supported on Linux.)', 45 }], 46 ], 47 }, 48 'includes': [ 49 'common_conditions.gypi', 50 ], 51 'conditions': [ 52 [ 'skia_scalar == "float"', 53 { 54 'defines': [ 55 'SK_SCALAR_IS_FLOAT', 56 'SK_CAN_USE_FLOAT', 57 ], 58 }, { # else, skia_scalar != "float" 59 'defines': [ 60 'SK_SCALAR_IS_FIXED', 61 'SK_CAN_USE_FLOAT', # we can still use floats along the way 62 ], 63 } 64 ], 65 [ 'skia_mesa', { 66 'defines': [ 67 'SK_MESA', 68 ], 69 'direct_dependent_settings': { 70 'defines': [ 71 'SK_MESA', 72 ], 73 }, 74 }], 75 [ 'skia_angle', { 76 'defines': [ 77 'SK_ANGLE', 78 ], 79 'direct_dependent_settings': { 80 'defines': [ 81 'SK_ANGLE', 82 ], 83 }, 84 }], 85 [ 'skia_win_debuggers_path and skia_os == "win"', 86 { 87 'defines': [ 88 'SK_USE_CDB', 89 ], 90 }, 91 ], 92 [ 'skia_android_framework==0', { 93 # These defines are not used for skia_android_framework, where we build 94 # one makefile and allow someone to add SK_DEBUG etc for their own 95 # debugging purposes. 96 'configurations': { 97 'Debug': { 98 'defines': [ 99 'SK_DEBUG', 100 'SK_DEVELOPER=1', 101 ], 102 }, 103 'Release': { 104 'defines': [ 105 'SK_RELEASE', 106 ], 107 }, 108 'Release_Developer': { 109 'inherit_from': ['Release'], 110 'defines': [ 111 'SK_DEVELOPER=1', 112 ], 113 }, 114 }, 115 }], 116 ], 117 }, # end 'target_defaults' 118} 119