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 # 'SK_USE_DISCARDABLE_SCALEDIMAGECACHE', # TODO(reed): Re-enable when tests don't crash with this. 20 ], 21 22 # Validate the 'skia_os' setting against 'OS', because only certain 23 # combinations work. You should only override 'skia_os' for certain 24 # situations, like building for iOS on a Mac. 25 'variables': { 26 'conditions': [ 27 [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") 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 == "chromeos" and OS != "linux"', { 41 'error': '<!(Skia ChromeOS build is only supported on Linux.)', 42 }], 43 ], 44 }, 45 'includes': [ 46 'common_conditions.gypi', 47 ], 48 'conditions': [ 49 [ 'skia_mesa', { 50 'defines': [ 51 'SK_MESA', 52 ], 53 'direct_dependent_settings': { 54 'defines': [ 55 'SK_MESA', 56 ], 57 }, 58 }], 59 [ 'skia_angle', { 60 'defines': [ 61 'SK_ANGLE', 62 ], 63 'direct_dependent_settings': { 64 'defines': [ 65 'SK_ANGLE', 66 ], 67 }, 68 }], 69 [ 'skia_win_debuggers_path and skia_os == "win"', 70 { 71 'defines': [ 72 'SK_USE_CDB', 73 ], 74 }, 75 ], 76 [ 'skia_android_framework==0', { 77 # These defines are not used for skia_android_framework, where we build 78 # one makefile and allow someone to add SK_DEBUG etc for their own 79 # debugging purposes. 80 'configurations': { 81 'Debug': { 'defines': [ 'SK_DEVELOPER=1' ] }, 82 'Release': { 'defines': [ 'NDEBUG' ] }, 83 'Release_Developer': { 84 'inherit_from': ['Release'], 85 'defines': [ 'SK_DEVELOPER=1' ], 86 }, 87 }, 88 }], 89 ], 90 }, # end 'target_defaults' 91 } 92