common.gypi 3.15 KB
Newer Older
1
# Copyright 2011 The Android Open Source Project
2
#
3 4
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
5 6 7
#
# This file is automatically included by gyp_skia when building any target.

8
{
9 10 11
  'includes': [
    'common_variables.gypi',
  ],
12

13
  'target_defaults': {
bungeman@google.com's avatar
bungeman@google.com committed
14 15 16 17
    'defines': [
      'SK_GAMMA_SRGB',
      'SK_GAMMA_APPLY_TO_A8',
    ],
18

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