forked from renren/bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.gyp
175 lines (175 loc) · 5.13 KB
/
bundle.gyp
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# gyp --depth . -Dlibrary=static_library bundle.gyp -fmsvs -G msvs_version=2010
# gyp --depth . -Dlibrary=static_library bundle.gyp -fmake
#
# drop -Gauto_regeneration=0, worked fine in ../gyp
# ls
# gyp src
# gyp --depth=. --toplevel-dir=. -Dlibrary=static_library gyp/bundle.gyp
{
'conditions': [
['OS=="linux"', {
'target_defaults': {
'cflags': ['-fPIC', '-g', '-O2', '-Wall'], #, '-std=c++0x'],
'defines': ['OS_LINUX', '_FILE_OFFSET_BITS=64'],
},
},],
['OS=="win"', {
'target_defaults': {
# 'cflags': ['-fPIC', '-g', '-O2',],
'defines': ['WIN32', 'OS_WIN', 'NOMINMAX', 'UNICODE', '_UNICODE', 'WIN32_LEAN_AND_MEAN', '_WIN32_WINNT=0x0501'],
'msvs_settings': {
'VCLinkerTool': {'GenerateDebugInformation': 'true',
'AdditionalLibraryDirectories': ['c:/boost_1_47_0/stage/lib'],
'SubSystem': 1}, # Console
'VCCLCompilerTool': {'DebugInformationFormat': '3',
'AdditionalIncludeDirectories': ['c:/boost_1_47_0/'],
'Optimization': 0}, # Disabled
},
},
},],
],
'targets': [
{
'target_name': 'bundle_unittest',
'type': 'executable',
'msvs_guid': '11384248-6F84-5DAE-8AB2-655600A90963',
'dependencies': [
'gtest.gyp:gtest_main',
'bundle',
],
'conditions':[
['OS=="linux"', {'libraries': ['-lboost_thread', '-lboost_system', '-lpthread'] }],
['OS=="win"', {'libraries': [] }],
],
'sources': [
'../src/bundle/bundle_compile_test.cc',
'../src/bundle/filelock_test.cc',
'../src/bundle/sixty_test.cc',
'../src/bundle/bundle_test.cc',
'../src/bundle/bundle_bench.cc',
#'../src/bundle/bundlewrite.cc',
#'../src/bundle/bundle_api_test.cc',
],
'include_dirs': [
'../src',
'../src/testing/gtest/include'
],
},
{
'target_name': 'bundle_api_test',
'type': 'executable',
'msvs_guid': '11384258-7F84-5DAE-8AB2-655600A90963',
'dependencies': [
'gtest.gyp:gtest_main',
'bundle',
],
'conditions':[
['OS=="linux"', {'libraries': ['-lboost_thread', '-lboost_system', '-lpthread'] }],
['OS=="win"', {'libraries': [] }],
],
'sources': [
'../src/bundle/bundle_api_test.cc',
],
'include_dirs': [
'../src',
'../src/testing/gtest/include'
],
},
{
'target_name': 'bundle',
'type': 'static_library',
'msvs_guid': 'B0FA2853-A0D3-44B8-BDE0-E8B89D372D16',
'include_dirs': ['../src'],
'dependencies': [
'base3.gyp:base3',
],
'sources': [
'../src/bundle/fslock.h',
'../src/bundle/bundle.h',
'../src/bundle/bundle.cc',
'../src/bundle/sixty.h',
'../src/bundle/murmurhash2.h',
'../src/bundle/murmurhash2.cc',
],
#'export_dependent_settings': ['base3.gyp:base3'],
},
{
'target_name': 'bundled',
'type': 'executable',
'msvs_guid': '2DEFD3FF-9903-41CD-AF2C-2249BE811651',
'include_dirs': ['../src'],
'dependencies': [
'base3.gyp:base3',
'cwf.gyp:cwfmain',
'bundle',
],
'conditions':[
['OS=="linux"', {'libraries': ['-lboost_thread', '-lboost_exception', '-lboost_system', '-lpthread'] }],
['OS=="win"', {'libraries': ['ws2_32.lib'] }],
],
'sources': [
'../src/bundle/bundleaction.cc',
],
},
{
'target_name': 'bundle_write',
'type': 'executable',
'msvs_guid': '2DEFD3FF-9903-41CD-AF2C-2249BE811652',
'include_dirs': ['../src'],
'dependencies': [
'base3.gyp:base3',
'bundle',
],
'conditions':[
['OS=="linux"', {'libraries': ['-lboost_system', '-lboost_thread', '-lpthread'] }],
['OS=="win"', {'libraries': ['ws2_32.lib'] }],
],
'sources': [
'../src/bundle/bundlewrite.cc',
],
},
{
'target_name': 'bundle_with_mooseclient',
'type': 'shared_library',
'msvs_guid': 'B0FA2853-A0D3-44B8-BDE1-E8B89D372D17',
'include_dirs': ['../src'],
'dependencies': ['mooseclient.gyp:mooseclient'],
'conditions':[
['OS=="linux"', {'libraries': ['-lboost_thread', '-lboost_system', '-lpthread', '-lrt'] }],
['OS=="win"', {'libraries': [] }],
],
'sources': [
'../src/bundle/fslock.h',
'../src/bundle/bundle.h',
'../src/bundle/bundle.cc',
'../src/bundle/sixty.h',
'../src/bundle/murmurhash2.h',
'../src/bundle/murmurhash2.cc',
],
'defines': ['USE_MOOSECLIENT=1'],
},
{
'target_name': 'bundle_with_mooseclient_unittest',
'type': 'executable',
'msvs_guid': '11384248-6F84-5DAF-9AB2-655600A90964',
'dependencies': [
'gtest.gyp:gtest',
'bundle_with_mooseclient',
],
'defines': ['USE_MOOSECLIENT=1'],
'conditions':[
['OS=="linux"', {'libraries': ['-lboost_thread', '-lboost_system', '-lpthread'] }],
['OS=="win"', {'libraries': [] }],
],
'sources': [
'../src/bundle/bundle_test.cc',
'../src/bundle/bundle_bench.cc',
'../src/bundle/filelock_test.cc',
],
'include_dirs': [
'../src',
'../src/testing/gtest/include'
],
},
],
}