forked from JCMais/node-libcurl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinding.gyp
More file actions
109 lines (109 loc) · 4.53 KB
/
binding.gyp
File metadata and controls
109 lines (109 loc) · 4.53 KB
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
{
'targets': [
{
'target_name': '<(module_name)',
'sources': [
'src/node_libcurl.cc',
'src/Easy.cc',
'src/Share.cc',
'src/Multi.cc',
'src/Curl.cc',
'src/CurlHttpPost.cc'
],
'include_dirs' : [
"<!(node -e \"require('nan')\")"
],
'conditions': [
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'DisableSpecificWarnings': ['4506', '4838'] #warning about v8 inline function and narrowing
}
},
'configurations' : {
'Release': {
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': '1',
'Optimization': 2, # /O2 safe optimization
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
'OmitFramePointers': 'true',
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'WarnAsError': 'true'
}
}
},
'Debug': {
'msvs_settings': {
'VCCLCompilerTool': {
'WarnAsError': 'false'
}
}
}
},
'dependencies': [
'<!@(node "<(module_root_dir)/tools/retrieve-win-deps.js")'
],
'defines' : [
'CURL_STATICLIB'
]
}, { # OS != "win"
'cflags_cc' : [
'-std=c++11',
'-O2',
'-Wno-narrowing',
'<!@(node "<(module_root_dir)/tools/curl-config.js" --cflags)',
],
# enable exceptions, remove level 3 optimization
'cflags_cc!': [
'-fno-exceptions',
'-O3'
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS':[
'-std=c++11','-stdlib=libc++',
'<!@(node "<(module_root_dir)/tools/curl-config.js" --cflags)',
],
'OTHER_CFLAGS':[
'<!@(node "<(module_root_dir)/tools/curl-config.js" --cflags)'
],
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load',
'-stdlib=libc++'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++11',
'OTHER_LDFLAGS': ['-stdlib=libc++'],
'WARNING_CFLAGS':[
'-Wno-c++11-narrowing',
'-Wno-constant-conversion'
]
},
'include_dirs' : [
'<!@(node "<(module_root_dir)/tools/curl-config.js" --cflags | sed s/-I//g)'
],
'libraries': [
'<!@(node "<(module_root_dir)/tools/curl-config.js" --libs)'
]
}]
]
},
{
'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
'destination': '<(module_path)'
}
]
}
]
}