-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.gypi
129 lines (97 loc) · 3.14 KB
/
common.gypi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
'variables': {
'distrib%': 'any', # 'raspi' for Raspberry PI
},
'target_defaults': {
'defines': [
'ARCH=<(arch)',
'PLATFORM=<(OS)'
],
'conditions': [
['OS=="linux"', {
'cflags_cc': ['-std=c++11 -pthread']
}],
['OS=="win"', {
'sources/': [['exclude', '_linux\\.cc$|_linux\\.h$']],
'msvs_configuration_attributes': {
'OutputDirectory': '.\\build\\$(ConfigurationName)\\$(Platform)\\',
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)\\',
'CharacterSet': '1',
},
}],
['arch=="x64"', {
'msvs_configuration_platform': 'x64'
}],
['OS!="win"', {
'sources/': [['exclude', '_win\\.cc$|_win\\.h$']]
}],
# for Raspberry PI
['distrib=="raspi"', {
'defines': ['_RASPI'],
}],
# anything other than Raspberry PI
['distrib!="raspi"', {
'sources/': [['exclude', '_raspi\\.cc$|_raspi\\.h$|_egl\\.cc$|_egl\\.cc$']],
}],
], # conditions
'configurations': {
'Release': {
'conditions': [
['OS=="win"', {
'defines': ['_WIN32'],
'msbuild_settings': {
'ClCompile': {
'Optimization': 'MaxSpeed',
'InlineFunctionExpansion': 'AnySuitable',
'IntrinsicFunctions': 'true',
'FavorSizeOrSpeed': 'Neither',
'StringPooling': 'true',
'RuntimeLibrary': 'MultiThreaded', # /MT
'ProgramDataBaseFileName':'$(OutDir)\\$(ProjectName).pdb',
},
'Link': {
'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
'OptimizeReferences': 'true',
'EnableCOMDATFolding': 'true',
'AdditionalLibraryDirectories': '.\\lib\\<(arch)\\release'
},
'ResourceCompile': {
'Culture': '0x03eb',
'ShowProgress': 'true',
'SuppressStartupBanner': 'true',
},
} # msbuild_settings
}]
] # conditions
}, # Release
'Debug': {
'defines': [
'_DEBUG',
],
'conditions': [
['OS=="win"', {
'defines': ['_WIN32'],
'msbuild_settings': {
'ClCompile': {
'Optimization': 'Disabled',
'RuntimeLibrary': 'MultiThreadedDebug',
'ProgramDataBaseFileName':'$(OutDir)\\$(ProjectName).pdb',
},
'Link': {
'GenerateDebugInformation': 'true',
'AdditionalLibraryDirectories': '.\\lib\\<(arch)\\debug',
'ImageHasSafeExceptionHandlers': 'false'
},
#'': {
# 'LinkIncremental': 'false'
#}
} # msbuild_settings
}],
['OS=="linux"', {
'cflags': ['-g']
}]
] # conditions
} # Debug
}, #configurations
}
}