2011-09-15 14:24:33 +00:00
|
|
|
# conditions used in both common.gypi and skia.gyp in chromium
|
|
|
|
#
|
|
|
|
{
|
|
|
|
'conditions' : [
|
|
|
|
|
|
|
|
['skia_os == "win"',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_WIN32',
|
|
|
|
'SK_IGNORE_STDINT_DOT_H',
|
2011-09-28 14:32:01 +00:00
|
|
|
'_CRT_SECURE_NO_WARNINGS',
|
2011-09-15 14:24:33 +00:00
|
|
|
],
|
|
|
|
'msvs_cygwin_shell': 0,
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
'WarningLevel': '1',
|
|
|
|
'WarnAsError': 'false',
|
|
|
|
'DebugInformationFormat': '3',
|
2011-09-16 15:47:33 +00:00
|
|
|
'AdditionalOptions': [ '/MP' ],
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalDependencies': [
|
|
|
|
'OpenGL32.lib',
|
|
|
|
'usp10.lib',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2011-09-28 14:32:01 +00:00
|
|
|
'DebugInformationFormat': '4', # editAndContiue (/ZI)
|
2011-10-03 20:15:13 +00:00
|
|
|
'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
|
2011-09-15 14:24:33 +00:00
|
|
|
'Optimization': '0', # optimizeDisabled (/Od)
|
|
|
|
'PreprocessorDefinitions': ['_DEBUG'],
|
|
|
|
'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
|
2011-09-28 14:32:01 +00:00
|
|
|
'ExceptionHandling': '0',
|
|
|
|
'RuntimeTypeInfo': 'false', # /GR-
|
|
|
|
'WarningLevel': '3', # level3 (/W3)
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
2011-09-28 14:32:01 +00:00
|
|
|
'GenerateDebugInformation': 'true', # /DEBUG
|
|
|
|
'LinkIncremental': '2', # /INCREMENTAL
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'Release': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2011-09-28 14:32:01 +00:00
|
|
|
'DebugInformationFormat': '3', # programDatabase (/Zi)
|
2011-10-03 20:15:13 +00:00
|
|
|
'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
|
2011-09-28 14:32:01 +00:00
|
|
|
'Optimization': '3', # full (/Ox)
|
|
|
|
'WholeProgramOptimization': 'true', #/GL
|
|
|
|
# Changing the floating point model requires rebaseling gm images
|
|
|
|
#'FloatingPointModel': '2', # fast (/fp:fast)
|
|
|
|
'FavorSizeOrSpeed': '1', # speed (/Ot)
|
2011-09-15 14:24:33 +00:00
|
|
|
'PreprocessorDefinitions': ['NDEBUG'],
|
2011-09-28 14:32:01 +00:00
|
|
|
'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
|
|
|
|
'ExceptionHandling': '0',
|
|
|
|
'RuntimeTypeInfo': 'false', # /GR-
|
|
|
|
'WarningLevel': '3', # level3 (/W3)
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
2011-09-28 14:32:01 +00:00
|
|
|
'GenerateDebugInformation': 'true', # /DEBUG
|
|
|
|
'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
2011-10-03 19:36:51 +00:00
|
|
|
'VCLibrarianTool': {
|
|
|
|
'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG
|
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
['skia_os in ["linux", "freebsd", "openbsd", "solaris"]',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_SAMPLES_FOR_X',
|
|
|
|
'SK_BUILD_FOR_UNIX',
|
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'cflags': ['-g']
|
|
|
|
},
|
|
|
|
'Release': {
|
|
|
|
'cflags': ['-O2']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'cflags': [ '-Wall', '-Wextra', '-Wno-unused' ],
|
|
|
|
'include_dirs' : [
|
|
|
|
'/usr/include/freetype2',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
['skia_os == "mac"',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_MAC',
|
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '0',
|
|
|
|
},
|
|
|
|
},
|
2011-10-10 14:19:40 +00:00
|
|
|
'Release': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '3',
|
|
|
|
},
|
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'xcode_settings': {
|
|
|
|
'SYMROOT': '<(DEPTH)/xcodebuild',
|
2011-10-12 18:12:11 +00:00
|
|
|
'SDKROOT': 'macosx10.6',
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
['skia_os == "ios"',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_IOS',
|
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '0',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'xcode_settings': {
|
|
|
|
'SYMROOT': '<(DEPTH)/xcodebuild',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2011-11-03 13:08:29 +00:00
|
|
|
|
|
|
|
['skia_os == "android"',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'ANDROID', # TODO: change these defines to SK_BUILD_FOR_ANDROID
|
|
|
|
'SK_BUILD_FOR_ANDROID',
|
|
|
|
'SK_BUILD_FOR_ANDROID_NDK',
|
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'cflags': ['-g']
|
|
|
|
},
|
|
|
|
'Release': {
|
|
|
|
'cflags': ['-O2']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'libraries': [
|
|
|
|
'-lstdc++',
|
|
|
|
'-lm',
|
|
|
|
|
|
|
|
],
|
|
|
|
'conditions': [
|
2011-11-03 17:31:41 +00:00
|
|
|
[ 'skia_target_arch == "arm" and arm_thumb == 1', {
|
|
|
|
'cflags': [
|
|
|
|
'-mthumb',
|
|
|
|
],
|
|
|
|
}],
|
2011-11-03 13:08:29 +00:00
|
|
|
[ 'skia_target_arch == "arm" and armv7 == 1', {
|
|
|
|
'defines': [
|
|
|
|
'__ARM_ARCH__=7',
|
|
|
|
],
|
|
|
|
'cflags': [
|
|
|
|
'-march=armv7-a',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
[ 'arm_neon == 1', {
|
|
|
|
'defines': [
|
|
|
|
'__ARM_HAVE_NEON',
|
|
|
|
],
|
|
|
|
'cflags': [
|
|
|
|
'-mfloat-abi=softfp',
|
|
|
|
'-mfpu=neon',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2011-09-15 14:24:33 +00:00
|
|
|
|
|
|
|
], # end 'conditions'
|
|
|
|
}
|
|
|
|
|
|
|
|
# Local Variables:
|
|
|
|
# tab-width:2
|
|
|
|
# indent-tabs-mode:nil
|
|
|
|
# End:
|
|
|
|
# vim: set expandtab tabstop=2 shiftwidth=2:
|