forked from jjhoughton/node-LDAP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbinding.gyp
70 lines (69 loc) · 2.2 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
{
"targets": [
{
"target_name": "LDAPCnx",
"sources": [ "LDAP.cc", "LDAPCnx.cc", "LDAPCookie.cc",
"LDAPSASL.cc", "LDAPXSASL.cc", "SASLDefaults.cc" ],
"include_dirs" : [
"<!(node -e \"require('nan')\")",
"/usr/local/include"
],
"defines": [
"LDAP_DEPRECATED"
],
"ldflags": [
"-L/usr/local/lib"
],
"cflags": [
"-Wall",
"-g"
],
"conditions": [
[ "SASL==\"n\"", { "sources!":
["LDAPSASL.cc", "SASLDefaults.cc"] } ],
[ "SASL==\"y\"", { "sources!": ["LDAPXSASL.cc"] } ],
['NODE_VERSION > 9', {
"conditions": [[
'OS=="linux"', {
"conditions": [[
"REDHAT_RELEASE == 6", {
"libraries": [ "../deps/RHEL6/libldap.a", "../deps/RHEL6/liblber.a" ]
}, {
"libraries": [ "../deps/RHEL7/libldap.a", "../deps/RHEL7/liblber.a" ]
}
]]
}, {
"libraries": [ "../deps/OSX/libldap.a", "../deps/OSX/liblber.a" ],
}
]],
"include_dirs": [ "deps/include" ],
"libraries": [ "-lresolv", "-lsasl2" ]
}, {
"libraries": [ "-lldap" ]
}]
]
}
],
"variables": {
"SASL": "<!(test -f /usr/include/sasl/sasl.h && echo y || echo n)",
"NODE_VERSION": "<!(node --version | cut -d. -f1 | cut -dv -f2)",
"REDHAT_RELEASE": "<!(test ! -e /etc/redhat-release || cat /etc/redhat-release | cut -d' ' -f3 | cut -d'.' -f 1)"
},
"conditions": [
[
"OS==\"mac\"",
{
"link_settings": {
"libraries": [
"-lldap"
]
},
"xcode_settings": {
'OTHER_LDFLAGS': [
'-L/usr/local/lib'
]
}
}
]
]
}