2012-03-16 18:28:24 +00:00
|
|
|
# Copyright 2012 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
{
|
|
|
|
# Get ready for the ugly...
|
|
|
|
#
|
|
|
|
# - We have to nest our variables dictionaries multiple levels deep, so that
|
|
|
|
# this and other gyp files can rely on previously-set variable values in
|
|
|
|
# their 'variables': { 'conditions': [] } clauses.
|
|
|
|
#
|
|
|
|
# Example 1:
|
|
|
|
# Within this file, we use the value of variable 'skia_os' to set the
|
|
|
|
# value of variable 'os_posix', so 'skia_os' must be defined within a
|
|
|
|
# "more inner" (enclosed) scope than 'os_posix'.
|
|
|
|
#
|
|
|
|
# Example 2:
|
|
|
|
# http://src.chromium.org/viewvc/chrome/trunk/src/third_party/libjpeg/libjpeg.gyp?revision=102306 ,
|
|
|
|
# which we currently import into our build, uses the value of 'os_posix'
|
|
|
|
# within the 'conditions' list in its 'variables' dict.
|
|
|
|
# In order for that to work, it needs the value of 'os_posix' to have been
|
|
|
|
# set within a "more inner" (enclosed) scope than its own 'variables' dict.
|
|
|
|
#
|
|
|
|
# - On the other hand, key/value pairs of a given 'variable' dict are only
|
|
|
|
# inherited by:
|
|
|
|
# 1. directly enclosing 'variable' dicts, and
|
|
|
|
# 2. "sibling" 'variable' dicts (which, I guess, are combined into a single
|
|
|
|
# 'variable' dict during gyp processing)
|
|
|
|
# and NOT inherited by "uncles" (siblings of directly enclosing 'variable'
|
|
|
|
# dicts), so we have to re-define every variable at every enclosure level
|
|
|
|
# within our ridiculous matryoshka doll of 'variable' dicts. That's why
|
|
|
|
# we have variable definitions like this: 'skia_os%': '<(skia_os)',
|
|
|
|
#
|
|
|
|
# See http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?revision=127004 ,
|
|
|
|
# which deals with these same constraints in a similar manner.
|
|
|
|
#
|
|
|
|
'variables': { # level 1
|
|
|
|
'variables': { # level 2
|
|
|
|
|
|
|
|
# Variables needed by conditions list within the level-2 variables dict.
|
|
|
|
'variables': { # level 3
|
|
|
|
# We use 'skia_os' instead of 'OS' throughout our gyp files, to allow
|
|
|
|
# for cross-compilation (e.g. building for either MacOS or iOS on Mac).
|
|
|
|
# We set it automatically based on 'OS' (the host OS), but allow the
|
|
|
|
# user to override it via GYP_DEFINES if they like.
|
|
|
|
'skia_os%': '<(OS)',
|
|
|
|
},
|
|
|
|
|
|
|
|
# Re-define all variables defined within the level-3 'variables' dict,
|
|
|
|
# so that siblings of the level-2 'variables' dict can see them.
|
|
|
|
'skia_os%': '<(skia_os)',
|
2012-09-24 19:41:43 +00:00
|
|
|
|
2012-03-16 18:28:24 +00:00
|
|
|
'conditions': [
|
2012-10-10 19:45:51 +00:00
|
|
|
[ 'skia_os == "win"', {
|
2012-03-16 18:28:24 +00:00
|
|
|
'os_posix%': 0,
|
|
|
|
}, {
|
|
|
|
'os_posix%': 1,
|
|
|
|
}],
|
2012-10-10 19:45:51 +00:00
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
|
2012-08-09 20:44:32 +00:00
|
|
|
'skia_arch_width%': 64,
|
|
|
|
}, {
|
|
|
|
'skia_arch_width%': 32,
|
|
|
|
}],
|
2012-10-10 19:45:51 +00:00
|
|
|
[ 'skia_os == "android"', {
|
2012-09-11 21:37:28 +00:00
|
|
|
'skia_static_initializers%': 0,
|
|
|
|
}, {
|
|
|
|
'skia_static_initializers%': 1,
|
|
|
|
}],
|
2012-10-10 19:45:51 +00:00
|
|
|
[ 'skia_os == "ios"', {
|
|
|
|
'skia_arch_type%': 'arm',
|
2013-07-31 12:57:27 +00:00
|
|
|
'arm_version%': 7,
|
2012-10-10 19:45:51 +00:00
|
|
|
'arm_neon%': 0, # neon asm files known not to work with the ios build
|
|
|
|
},{ # skia_os is not ios
|
|
|
|
'skia_arch_type%': 'x86',
|
2013-07-31 12:57:27 +00:00
|
|
|
'arm_version%': 0,
|
2012-10-10 19:45:51 +00:00
|
|
|
'arm_neon%': 0,
|
|
|
|
}],
|
2012-03-16 18:28:24 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
'skia_scalar%': 'float',
|
|
|
|
'skia_mesa%': 0,
|
2012-06-28 18:48:06 +00:00
|
|
|
'skia_nv_path_rendering%': 0,
|
2013-01-07 14:26:40 +00:00
|
|
|
'skia_stroke_path_rendering%': 0,
|
2013-01-09 21:04:52 +00:00
|
|
|
'skia_android_path_rendering%': 0,
|
2012-10-29 19:24:45 +00:00
|
|
|
'skia_texture_cache_mb_limit%': 0,
|
2012-04-02 20:42:26 +00:00
|
|
|
'skia_angle%': 0,
|
2012-08-16 16:13:40 +00:00
|
|
|
'skia_directwrite%': 0,
|
2012-08-02 14:03:32 +00:00
|
|
|
'skia_gpu%': 1,
|
2013-02-08 21:45:33 +00:00
|
|
|
'skia_osx_sdkroot%': '',
|
2012-11-29 15:09:58 +00:00
|
|
|
'skia_profile_enabled%': 0,
|
2013-03-08 22:22:44 +00:00
|
|
|
'skia_win_debuggers_path%': '',
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_shared_lib%': 0,
|
2013-07-17 19:29:19 +00:00
|
|
|
'skia_opencl%': 0,
|
2013-06-20 20:28:54 +00:00
|
|
|
|
|
|
|
# These variables determine the default optimization level for different
|
|
|
|
# compilers.
|
|
|
|
'skia_default_vs_optimization_level': 3, # full (/Ox)
|
|
|
|
'skia_default_gcc_optimization_level': 3, # -O3
|
2012-03-16 18:28:24 +00:00
|
|
|
},
|
|
|
|
|
2013-03-22 13:16:06 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'skia_os == "win" and skia_arch_width == 32 or '
|
|
|
|
'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android"] or '
|
|
|
|
'skia_os == "mac" and skia_arch_width == 32', {
|
|
|
|
'skia_warnings_as_errors%': 1,
|
|
|
|
}, {
|
|
|
|
'skia_warnings_as_errors%': 0,
|
|
|
|
}],
|
2013-06-20 20:28:54 +00:00
|
|
|
|
|
|
|
# This variable allows the user to customize the optimization level used
|
|
|
|
# by the compiler. The user should be aware that this has different
|
|
|
|
# meanings for different compilers and should exercise caution when
|
|
|
|
# overriding it.
|
|
|
|
[ 'skia_os == "win"', {
|
|
|
|
'skia_release_optimization_level%': '<(skia_default_vs_optimization_level)',
|
|
|
|
}, {
|
|
|
|
'skia_release_optimization_level%': '<(skia_default_gcc_optimization_level)',
|
|
|
|
}],
|
2013-03-22 13:16:06 +00:00
|
|
|
],
|
|
|
|
|
2012-03-16 18:28:24 +00:00
|
|
|
# Re-define all variables defined within the level-2 'variables' dict,
|
|
|
|
# so that siblings of the level-1 'variables' dict can see them.
|
2013-07-31 12:57:27 +00:00
|
|
|
'arm_version%': '<(arm_version)',
|
2012-10-10 19:45:51 +00:00
|
|
|
'arm_neon%': '<(arm_neon)',
|
2013-07-31 12:57:27 +00:00
|
|
|
'arm_neon_optional%': 0,
|
2012-03-16 18:28:24 +00:00
|
|
|
'skia_os%': '<(skia_os)',
|
|
|
|
'os_posix%': '<(os_posix)',
|
|
|
|
'skia_scalar%': '<(skia_scalar)',
|
|
|
|
'skia_mesa%': '<(skia_mesa)',
|
2012-06-28 18:48:06 +00:00
|
|
|
'skia_nv_path_rendering%': '<(skia_nv_path_rendering)',
|
2013-01-07 14:26:40 +00:00
|
|
|
'skia_stroke_path_rendering%': '<(skia_stroke_path_rendering)',
|
2013-01-09 21:04:52 +00:00
|
|
|
'skia_android_path_rendering%': '<(skia_android_path_rendering)',
|
2012-10-29 19:24:45 +00:00
|
|
|
'skia_texture_cache_mb_limit%': '<(skia_texture_cache_mb_limit)',
|
2012-04-02 20:42:26 +00:00
|
|
|
'skia_angle%': '<(skia_angle)',
|
2012-06-28 16:08:05 +00:00
|
|
|
'skia_arch_width%': '<(skia_arch_width)',
|
2012-10-10 19:45:51 +00:00
|
|
|
'skia_arch_type%': '<(skia_arch_type)',
|
2012-08-16 16:13:40 +00:00
|
|
|
'skia_directwrite%': '<(skia_directwrite)',
|
2012-08-02 14:03:32 +00:00
|
|
|
'skia_gpu%': '<(skia_gpu)',
|
2013-06-14 17:10:09 +00:00
|
|
|
'skia_win_exceptions%': 0,
|
2012-09-20 16:10:02 +00:00
|
|
|
'skia_osx_sdkroot%': '<(skia_osx_sdkroot)',
|
2012-11-29 15:09:58 +00:00
|
|
|
'skia_profile_enabled%': '<(skia_profile_enabled)',
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_shared_lib%': '<(skia_shared_lib)',
|
2013-07-17 19:29:19 +00:00
|
|
|
'skia_opencl%': '<(skia_opencl)',
|
2012-08-13 14:26:36 +00:00
|
|
|
'skia_static_initializers%': '<(skia_static_initializers)',
|
2012-10-04 12:52:03 +00:00
|
|
|
'ios_sdk_version%': '6.0',
|
2013-03-08 18:00:16 +00:00
|
|
|
'skia_win_debuggers_path%': '<(skia_win_debuggers_path)',
|
2013-07-03 15:55:05 +00:00
|
|
|
'skia_asan_build%': 0,
|
2012-08-13 14:26:36 +00:00
|
|
|
|
2012-08-08 20:39:17 +00:00
|
|
|
# These are referenced by our .gypi files that list files (e.g. core.gypi)
|
|
|
|
#
|
|
|
|
'skia_src_path%': '../src',
|
|
|
|
'skia_include_path%': '../include',
|
2012-03-16 18:28:24 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
# Local Variables:
|
|
|
|
# tab-width:2
|
|
|
|
# indent-tabs-mode:nil
|
|
|
|
# End:
|
2012-08-23 18:14:13 +00:00
|
|
|
# vim: set expandtab tabstop=2 shiftwidth=2:
|