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_GAMMA_SRGB', 16 'SK_GAMMA_APPLY_TO_A8', 17 'SK_SCALAR_TO_FLOAT_EXCLUDED', # temporary to allow Chrome to call SkFloatToScalar 18 ], 19 20 # Validate the 'skia_os' setting against 'OS', because only certain 21 # combinations work. You should only override 'skia_os' for certain 22 # situations, like building for iOS on a Mac. 23 'variables': { 24 'conditions': [ 25 [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \ 26 (skia_os == "nacl" and OS == "linux") or \ 27 (skia_os == "chromeos" and OS == "linux"))', { 28 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))', 29 }], 30 [ 'skia_mesa and skia_os not in ["mac", "linux"]', { 31 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)', 32 }], 33 [ 'skia_angle and not skia_os == "win"', { 34 'error': '<!(skia_angle=1 only supported with skia_os="win".)', 35 }], 36 [ 'skia_arch_width != 32 and skia_arch_width != 64', { 37 'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)', 38 }], 39 [ 'skia_os == "nacl" and OS != "linux"', { 40 'error': '<!(Skia NaCl build only currently supported on Linux.)', 41 }], 42 [ 'skia_os == "chromeos" and OS != "linux"', { 43 'error': '<!(Skia ChromeOS build is only supported on Linux.)', 44 }], 45 ], 46 }, 47 'includes': [ 48 'common_conditions.gypi', 49 ], 50 'conditions': [ 51 [ 'skia_scalar == "float"', 52 { 53 'defines': [ 54 'SK_SCALAR_IS_FLOAT', 55 'SK_CAN_USE_FLOAT', 56 ], 57 }, { # else, skia_scalar != "float" 58 'defines': [ 59 'SK_SCALAR_IS_FIXED', 60 'SK_CAN_USE_FLOAT', # we can still use floats along the way 61 ], 62 } 63 ], 64 [ 'skia_mesa', { 65 'defines': [ 66 'SK_MESA', 67 ], 68 'direct_dependent_settings': { 69 'defines': [ 70 'SK_MESA', 71 ], 72 }, 73 }], 74 [ 'skia_angle', { 75 'defines': [ 76 'SK_ANGLE', 77 ], 78 'direct_dependent_settings': { 79 'defines': [ 80 'SK_ANGLE', 81 ], 82 }, 83 }], 84 [ 'skia_win_debuggers_path and skia_os == "win"', 85 { 86 'defines': [ 87 'SK_USE_CDB', 88 ], 89 }, 90 ], 91 ], 92 'configurations': { 93 'Debug': { 94 'defines': [ 95 'SK_DEBUG', 96 'SK_DEVELOPER=1', 97 ], 98 }, 99 'Release': { 100 'defines': [ 101 'SK_RELEASE', 102 ], 103 }, 104 'Release_Developer': { 105 'inherit_from': ['Release'], 106 'defines': [ 107 'SK_DEVELOPER=1', 108 ], 109 }, 110 }, 111 }, # end 'target_defaults' 112} 113