Made node library buildable from source tree

This commit is contained in:
murgatroid99 2015-01-23 10:53:51 -08:00
parent be555df5b0
commit 7498521aee
1 changed files with 29 additions and 6 deletions

View File

@ -1,8 +1,13 @@
{ {
"variables" : {
'no_install': "<!(echo $GRPC_NO_INSTALL)",
'grpc_root': "<!(echo $GRPC_ROOT)",
'grpc_lib_subdir': "<!(echo $GRPC_LIB_SUBDIR)"
},
"targets" : [ "targets" : [
{ {
'include_dirs': [ 'include_dirs': [
"<!(node -e \"require('nan')\")" "<!(nodejs -e \"require('nan')\")"
], ],
'cxxflags': [ 'cxxflags': [
'-Wall', '-Wall',
@ -13,14 +18,11 @@
'-Werror', '-Werror',
], ],
'ldflags': [ 'ldflags': [
'-g', '-g'
'-L/usr/local/google/home/mlumish/grpc_dev/lib'
], ],
'link_settings': { 'link_settings': {
'libraries': [ 'libraries': [
'-lgrpc',
'-lrt', '-lrt',
'-lgpr',
'-lpthread' '-lpthread'
], ],
}, },
@ -37,6 +39,27 @@
"server_credentials.cc", "server_credentials.cc",
"tag.cc", "tag.cc",
"timeval.cc" "timeval.cc"
],
'conditions' : [
['no_install=="yes"', {
'include_dirs': [
"<(grpc_root)/include"
],
'link_settings': {
'libraries': [
'<(grpc_root)/<(grpc_lib_subdir)/libgrpc.a',
'<(grpc_root)/<(grpc_lib_subdir)/libgpr.a'
]
}
}],
['no_install!="yes"', {
'link_settings': {
'libraries': [
'-lgrpc',
'-lgpr'
]
}
}]
] ]
} }
] ]