murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 1 | { |
| 2 | "targets" : [ |
| 3 | { |
| 4 | 'include_dirs': [ |
Dan Ciruli | 60fcca5 | 2015-02-25 12:24:39 -0800 | [diff] [blame] | 5 | "<!(node -e \"require('nan')\")" |
murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 6 | ], |
murgatroid99 | ff43c09 | 2015-02-09 11:41:23 -0800 | [diff] [blame] | 7 | 'cflags': [ |
murgatroid99 | d7e3a2b | 2015-02-26 14:52:51 -0800 | [diff] [blame] | 8 | '-std=c++0x', |
murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 9 | '-Wall', |
| 10 | '-pthread', |
| 11 | '-pedantic', |
| 12 | '-g', |
| 13 | '-zdefs' |
murgatroid99 | ff43c09 | 2015-02-09 11:41:23 -0800 | [diff] [blame] | 14 | '-Werror' |
| 15 | ], |
murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 16 | 'ldflags': [ |
murgatroid99 | 51fca2d | 2015-01-23 10:53:51 -0800 | [diff] [blame] | 17 | '-g' |
murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 18 | ], |
Alexander Staubo | 425e46c | 2015-04-05 01:33:58 -0400 | [diff] [blame] | 19 | "conditions": [ |
murgatroid99 | b0d8b31 | 2015-07-06 11:08:22 -0700 | [diff] [blame^] | 20 | ['OS != "win"', { |
| 21 | 'variables': { |
| 22 | 'has_pkg_config': '<!(command -v pkg-config >/dev/null 2>&1 && echo true || echo false)' |
| 23 | }, |
| 24 | 'conditions': [ |
| 25 | ['has_pkg_config == "true"', { |
| 26 | 'link_settings': { |
| 27 | 'libraries': [ |
| 28 | '<!@(pkg-config --libs-only-l grpc)' |
| 29 | ] |
| 30 | }, |
| 31 | 'cflags': [ |
| 32 | '<!@(pkg-config --cflags grpc)' |
| 33 | ], |
| 34 | 'libraries': [ |
| 35 | '<!@(pkg-config --libs-only-L grpc)' |
| 36 | ] |
| 37 | }, { |
| 38 | 'link_settings': { |
| 39 | 'libraries': [ |
| 40 | '-lpthread', |
| 41 | '-lgrpc', |
| 42 | '-lgpr' |
| 43 | ], |
| 44 | }, |
| 45 | 'conditions':[ |
| 46 | ['OS != "mac"', { |
| 47 | 'link_settings': { |
| 48 | 'libraries': [ |
| 49 | '-lrt' |
| 50 | ] |
| 51 | } |
| 52 | }] |
| 53 | ] |
| 54 | } |
| 55 | ] |
| 56 | ] |
| 57 | }], |
Alexander Staubo | 425e46c | 2015-04-05 01:33:58 -0400 | [diff] [blame] | 58 | ['OS == "mac"', { |
| 59 | 'xcode_settings': { |
| 60 | 'MACOSX_DEPLOYMENT_TARGET': '10.9', |
| 61 | 'OTHER_CFLAGS': [ |
| 62 | '-std=c++11', |
| 63 | '-stdlib=libc++' |
| 64 | ] |
| 65 | } |
Alexander Staubo | 425e46c | 2015-04-05 01:33:58 -0400 | [diff] [blame] | 66 | }] |
| 67 | ], |
murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 68 | "target_name": "grpc", |
| 69 | "sources": [ |
murgatroid99 | 9df2693 | 2015-01-26 17:17:59 -0800 | [diff] [blame] | 70 | "ext/byte_buffer.cc", |
| 71 | "ext/call.cc", |
| 72 | "ext/channel.cc", |
| 73 | "ext/completion_queue_async_worker.cc", |
| 74 | "ext/credentials.cc", |
murgatroid99 | 9df2693 | 2015-01-26 17:17:59 -0800 | [diff] [blame] | 75 | "ext/node_grpc.cc", |
| 76 | "ext/server.cc", |
| 77 | "ext/server_credentials.cc", |
murgatroid99 | 9df2693 | 2015-01-26 17:17:59 -0800 | [diff] [blame] | 78 | "ext/timeval.cc" |
murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 79 | ] |
| 80 | } |
| 81 | ] |
| 82 | } |