-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbinding.gyp
70 lines (70 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
{
"conditions": [
["OS=='mac'", {
"variables": { "oci_version%": "11" },
}, {
"variables": { "oci_version%": "12" },
}],
],
"targets": [
{
"target_name": "oracle_bindings",
"sources": [ "src/connection.cpp",
"src/oracle_bindings.cpp",
"src/executeBaton.cpp",
"src/outParam.cpp",
"src/reader.cpp",
"src/statement.cpp" ],
"conditions": [
["OS=='mac'", {
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"GCC_ENABLE_CPP_RTTI": "YES"
},
"variables": {
"oci_include_dir%": "<!(if [ -z $OCI_INCLUDE_DIR ]; then echo \"/opt/instantclient/sdk/include/\"; else echo $OCI_INCLUDE_DIR; fi)",
"oci_lib_dir%": "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
},
"libraries": [ "-locci", "-lclntsh", "-lnnz<(oci_version)" ],
"link_settings": {"libraries": [ '-L<(oci_lib_dir)'] }
}],
["OS=='linux'", {
"variables": {
"oci_include_dir%": "<!(if [ -z $OCI_INCLUDE_DIR ]; then echo \"/opt/instantclient/sdk/include/\"; else echo $OCI_INCLUDE_DIR; fi)",
"oci_lib_dir%": "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
},
"defines": ["_GLIBCXX_USE_CXX11_ABI=0"],
"libraries": [ "-locci", "-lclntsh", "-lnnz<(oci_version)" ],
"link_settings": {"libraries": [ '-L<(oci_lib_dir)'] }
}],
["OS=='win'", {
"configurations": {
"Release": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "2"
}
},
},
"Debug": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "3"
}
},
}
},
"variables": {
"oci_include_dir%": "<!(IF DEFINED OCI_INCLUDE_DIR (echo %OCI_INCLUDE_DIR%) ELSE (echo C:\oracle\instantclient\sdk\include))",
"oci_lib_dir%": "<!(IF DEFINED OCI_LIB_DIR (echo %OCI_LIB_DIR%) ELSE (echo C:\oracle\instantclient\sdk\lib\msvc))",
},
# "libraries": [ "-loci" ],
"link_settings": {"libraries": [ '<(oci_lib_dir)\oraocci<(oci_version).lib'] }
}]
],
"include_dirs": [ "<(oci_include_dir)", "<!(node -e \"require('nan')\")" ],
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ]
}
]
}