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