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_USE_DISCARDABLE_SCALEDIMAGECACHE', # TODO(reed): Re-enable when tests don't crash with this. 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 == "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" or skia_os == "linux" or skia_os == "mac")', { 34 'error': '<!(skia_angle=1 only supported with skia_os="win" or skia_os="linux" or skia_os="mac".)', 35 }], 36 [ 'skia_os == "chromeos" and OS != "linux"', { 37 'error': '<!(Skia ChromeOS build is only supported on Linux.)', 38 }], 39 ], 40 }, 41 'includes': [ 42 'common_conditions.gypi', 43 ], 44 'conditions': [ 45 [ 'skia_mesa', { 46 'defines': [ 47 'SK_MESA', 48 ], 49 'direct_dependent_settings': { 50 'defines': [ 51 'SK_MESA', 52 ], 53 }, 54 }], 55 [ 'skia_angle', { 56 'defines': [ 57 'SK_ANGLE', 58 ], 59 'direct_dependent_settings': { 60 'defines': [ 61 'SK_ANGLE', 62 ], 63 }, 64 }], 65 [ 'skia_vulkan', { 66 'defines': [ 67 'SK_VULKAN', 68 ], 69 'direct_dependent_settings': { 70 'defines': [ 71 'SK_VULKAN', 72 ], 73 }, 74 }], 75 [ 'skia_command_buffer', { 76 'defines': [ 77 'SK_COMMAND_BUFFER', 78 ], 79 'direct_dependent_settings': { 80 'defines': [ 81 'SK_COMMAND_BUFFER', 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': { 'defines': [ 'SK_DEVELOPER=1' ] }, 98 'Release': { 'defines': [ 'NDEBUG' ] }, 99 'Release_Developer': { 100 'inherit_from': ['Release'], 101 'defines': [ 'SK_DEVELOPER=1' ], 102 }, 103 }, 104 }], 105 ], 106 }, # end 'target_defaults' 107} 108