forked from SAP-archive/node-rfc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
81 lines (73 loc) · 2.62 KB
/
binding.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
{
"variables": {
"linux_nwrfcsdk_path": "/usr/sap/nwrfcsdk",
"msvs_nwrfcsdk_path": "c:\\nwrfcsdk-64",
# _todo: http://stackoverflow.com/questions/17023442/referring-to-environment-variables-from-binding-gyp-node-gyp
# "msvs_nwrfcsdk_path": '! (echo %SAPNWRFC_HOME%)'
},
"targets": [
{
"target_name": "rfc",
"sources": [ "src/rfc.cc", "src/error.cc", "src/wrappers.cc", "src/Client.cc" ],
"defines": [
"SAPwithUNICODE",
"SAPwithTHREADS",
"NDEBUG"
],
"conditions": [
[ 'OS=="linux"', {
"cflags_cc!": [
"-Wall"
],
"defines": [
"SAPwithUNICODE",
"SAPwithTHREADS",
"SAPonLIN",
"SAPonUNIX",
"_LARGEFILE_SOURCE",
"_FILE_OFFSET_BITS=64",
"__NO_MATH_INLINES"
],
"link_settings": {
"libraries": ["-L<(linux_nwrfcsdk_path)/lib", "-lsapnwrfc", "-lsapucum"]
},
"include_dirs": [
"<(linux_nwrfcsdk_path)/include/"
],
'product_dir' : 'linux_x64'
}],
[ 'OS=="win"', {
'defines': [
'PLATFORM="win32"',
'WIN32',
'_AFXDLL',
'_CRT_NON_CONFORMING_SWPRINTFS',
'_CRT_SECURE_NO_DEPRECATE',
'_CRT_NONSTDC_NO_DEPRECATE',
'SAPonNT',
'UNICODE',
'_UNICODE'
],
'conditions': [
[ 'target_arch=="ia32"' , {'defines' : ['_X86_'] , 'product_dir': 'win32_x86' }],
[ 'target_arch=="x64"' , {'defines': ['_AMD64_'], 'product_dir': 'win32_x64' }]
],
'include_dirs': [
'<(msvs_nwrfcsdk_path)/include'
],
'msvs_configuration_attributes': {
'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
'IntermediateDirectory': '$(OutDir)\\obj'
},
'msvs_settings': {
'VCLinkerTool': {
'AdditionalLibraryDirectories': [ '<(msvs_nwrfcsdk_path)/lib' ],
'AdditionalDependencies': [ 'sapnwrfc.lib', 'libsapucum.lib' ]
},
},
#'libraries': [ '-lsapnwrfc.lib', '-llibsapucum.lib' ],
}]
] # conditions
}
]
}