blob: 9ea490ee3580981cab9e3b759032092a3d6b0981 [file] [log] [blame]
seanpaul@google.com1134f982011-09-15 14:24:33 +00001# conditions used in both common.gypi and skia.gyp in chromium
2#
3{
4 'conditions' : [
5
6 ['skia_os == "win"',
7 {
8 'defines': [
9 'SK_BUILD_FOR_WIN32',
10 'SK_IGNORE_STDINT_DOT_H',
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000011 '_CRT_SECURE_NO_WARNINGS',
seanpaul@google.com1134f982011-09-15 14:24:33 +000012 ],
13 'msvs_cygwin_shell': 0,
14 'msvs_settings': {
15 'VCCLCompilerTool': {
16 'WarningLevel': '1',
17 'WarnAsError': 'false',
18 'DebugInformationFormat': '3',
seanpaul@google.com8f78fec2011-09-16 15:47:33 +000019 'AdditionalOptions': [ '/MP' ],
seanpaul@google.com1134f982011-09-15 14:24:33 +000020 },
21 'VCLinkerTool': {
22 'AdditionalDependencies': [
23 'OpenGL32.lib',
24 'usp10.lib',
25 ],
26 },
27 },
28 'configurations': {
29 'Debug': {
30 'msvs_settings': {
31 'VCCLCompilerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000032 'DebugInformationFormat': '4', # editAndContiue (/ZI)
33 'ProgramDataBaseFileName': '$(OutDir)$(ProjectName).pdb',
seanpaul@google.com1134f982011-09-15 14:24:33 +000034 'Optimization': '0', # optimizeDisabled (/Od)
35 'PreprocessorDefinitions': ['_DEBUG'],
36 'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000037 'ExceptionHandling': '0',
38 'RuntimeTypeInfo': 'false', # /GR-
39 'WarningLevel': '3', # level3 (/W3)
seanpaul@google.com1134f982011-09-15 14:24:33 +000040 },
41 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000042 'GenerateDebugInformation': 'true', # /DEBUG
43 'LinkIncremental': '2', # /INCREMENTAL
seanpaul@google.com1134f982011-09-15 14:24:33 +000044 },
45 },
46 },
47 'Release': {
48 'msvs_settings': {
49 'VCCLCompilerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000050 'DebugInformationFormat': '3', # programDatabase (/Zi)
51 'ProgramDataBaseFileName': '$(OutDir)$(ProjectName).pdb',
52 'Optimization': '3', # full (/Ox)
53 'WholeProgramOptimization': 'true', #/GL
54 # Changing the floating point model requires rebaseling gm images
55 #'FloatingPointModel': '2', # fast (/fp:fast)
56 'FavorSizeOrSpeed': '1', # speed (/Ot)
seanpaul@google.com1134f982011-09-15 14:24:33 +000057 'PreprocessorDefinitions': ['NDEBUG'],
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000058 'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
59 'ExceptionHandling': '0',
60 'RuntimeTypeInfo': 'false', # /GR-
61 'WarningLevel': '3', # level3 (/W3)
seanpaul@google.com1134f982011-09-15 14:24:33 +000062 },
63 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000064 'GenerateDebugInformation': 'true', # /DEBUG
65 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
seanpaul@google.com1134f982011-09-15 14:24:33 +000066 },
67 },
68 },
69 },
70 },
71 ],
72
73 ['skia_os in ["linux", "freebsd", "openbsd", "solaris"]',
74 {
75 'defines': [
76 'SK_SAMPLES_FOR_X',
77 'SK_BUILD_FOR_UNIX',
78 ],
79 'configurations': {
80 'Debug': {
81 'cflags': ['-g']
82 },
83 'Release': {
84 'cflags': ['-O2']
85 },
86 },
87 'cflags': [ '-Wall', '-Wextra', '-Wno-unused' ],
88 'include_dirs' : [
89 '/usr/include/freetype2',
90 ],
91 },
92 ],
93
94 ['skia_os == "mac"',
95 {
96 'defines': [
97 'SK_BUILD_FOR_MAC',
98 ],
99 'configurations': {
100 'Debug': {
101 'xcode_settings': {
102 'GCC_OPTIMIZATION_LEVEL': '0',
103 },
104 },
105 },
106 'xcode_settings': {
107 'SYMROOT': '<(DEPTH)/xcodebuild',
108 },
109 },
110 ],
111
112 ['skia_os == "ios"',
113 {
114 'defines': [
115 'SK_BUILD_FOR_IOS',
116 ],
117 'configurations': {
118 'Debug': {
119 'xcode_settings': {
120 'GCC_OPTIMIZATION_LEVEL': '0',
121 },
122 },
123 },
124 'xcode_settings': {
125 'SYMROOT': '<(DEPTH)/xcodebuild',
126 },
127 },
128 ],
129
130 ], # end 'conditions'
131}
132
133# Local Variables:
134# tab-width:2
135# indent-tabs-mode:nil
136# End:
137# vim: set expandtab tabstop=2 shiftwidth=2: