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 15 # 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. 18 'variables': { 19 'conditions': [ 20 [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \ 21 (skia_os == "nacl" and OS == "linux") or \ 22 (skia_os == "chromeos" and OS == "linux"))', { 23 'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))', 24 }], 25 [ 'skia_mesa and skia_os not in ["mac", "linux"]', { 26 'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)', 27 }], 28 [ 'skia_angle and not skia_os == "win"', { 29 'error': '<!(skia_angle=1 only supported with skia_os="win".)', 30 }], 31 [ 'skia_arch_width != 32 and skia_arch_width != 64', { 32 'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)', 33 }], 34 [ 'skia_os == "nacl" and OS != "linux"', { 35 'error': '<!(Skia NaCl build only currently supported on Linux.)', 36 }], 37 [ 'skia_os == "chromeos" and OS != "linux"', { 38 'error': '<!(Skia ChromeOS build is only supported on Linux.)', 39 }], 40 ], 41 }, 42 'includes': [ 43 'common_conditions.gypi', 44 ], 45 'conditions': [ 46 [ 'skia_scalar == "float"', 47 { 48 'defines': [ 49 'SK_SCALAR_IS_FLOAT', 50 'SK_CAN_USE_FLOAT', 51 ], 52 }, { # else, skia_scalar != "float" 53 'defines': [ 54 'SK_SCALAR_IS_FIXED', 55 'SK_CAN_USE_FLOAT', # we can still use floats along the way 56 ], 57 } 58 ], 59 [ 'skia_mesa', { 60 'defines': [ 61 'SK_MESA', 62 ], 63 'direct_dependent_settings': { 64 'defines': [ 65 'SK_MESA', 66 ], 67 }, 68 }], 69 [ 'skia_angle', { 70 'defines': [ 71 'SK_ANGLE', 72 ], 73 'direct_dependent_settings': { 74 'defines': [ 75 'SK_ANGLE', 76 ], 77 }, 78 }], 79 [ 'skia_win_debuggers_path and skia_os == "win"', 80 { 81 'defines': [ 82 'SK_USE_CDB', 83 ], 84 }, 85 ], 86 ], 87 'configurations': { 88 'Debug': { 89 'defines': [ 90 'SK_DEBUG', 91 'GR_DEBUG=1', 92 'SK_DEVELOPER=1', 93 ], 94 }, 95 'Release': { 96 'defines': [ 97 'SK_RELEASE', 98 'GR_RELEASE=1', 99 ], 100 }, 101 'Release_Developer': { 102 'inherit_from': ['Release'], 103 'defines': [ 104 'SK_DEVELOPER=1', 105 ], 106 }, 107 }, 108 }, # end 'target_defaults' 109 } 110 # Local Variables: 111 # tab-width:2 112 # indent-tabs-mode:nil 113 # End: 114 # vim: set expandtab tabstop=2 shiftwidth=2: 115