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', |
murgatroid99 | 522b93c | 2015-06-30 17:55:16 -0700 | [diff] [blame] | 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': { |
murgatroid99 | b771f91 | 2015-07-06 16:44:35 -0700 | [diff] [blame] | 22 | 'pkg_config_grpc': '<!(pkg-config --exists grpc >/dev/null 2>&1 && echo true || echo false)' |
murgatroid99 | b0d8b31 | 2015-07-06 11:08:22 -0700 | [diff] [blame] | 23 | }, |
| 24 | 'conditions': [ |
murgatroid99 | b771f91 | 2015-07-06 16:44:35 -0700 | [diff] [blame] | 25 | ['pkg_config_grpc == "true"', { |
murgatroid99 | b0d8b31 | 2015-07-06 11:08:22 -0700 | [diff] [blame] | 26 | 'link_settings': { |
| 27 | 'libraries': [ |
murgatroid99 | 357e181 | 2015-07-06 12:11:44 -0700 | [diff] [blame] | 28 | '<!@(pkg-config --libs-only-l --static grpc)' |
murgatroid99 | b0d8b31 | 2015-07-06 11:08:22 -0700 | [diff] [blame] | 29 | ] |
| 30 | }, |
| 31 | 'cflags': [ |
| 32 | '<!@(pkg-config --cflags grpc)' |
| 33 | ], |
| 34 | 'libraries': [ |
murgatroid99 | 357e181 | 2015-07-06 12:11:44 -0700 | [diff] [blame] | 35 | '<!@(pkg-config --libs-only-L --static grpc)' |
murgatroid99 | 06e5471 | 2015-07-06 17:27:46 -0700 | [diff] [blame] | 36 | ], |
| 37 | 'ldflags': [ |
| 38 | '<!@(pkg-config --libs-only-other --static grpc)' |
murgatroid99 | b0d8b31 | 2015-07-06 11:08:22 -0700 | [diff] [blame] | 39 | ] |
| 40 | }, { |
| 41 | 'link_settings': { |
| 42 | 'libraries': [ |
| 43 | '-lpthread', |
| 44 | '-lgrpc', |
| 45 | '-lgpr' |
| 46 | ], |
| 47 | }, |
| 48 | 'conditions':[ |
| 49 | ['OS != "mac"', { |
| 50 | 'link_settings': { |
| 51 | 'libraries': [ |
| 52 | '-lrt' |
| 53 | ] |
| 54 | } |
| 55 | }] |
| 56 | ] |
| 57 | } |
| 58 | ] |
| 59 | ] |
| 60 | }], |
Alexander Staubo | 425e46c | 2015-04-05 01:33:58 -0400 | [diff] [blame] | 61 | ['OS == "mac"', { |
| 62 | 'xcode_settings': { |
| 63 | 'MACOSX_DEPLOYMENT_TARGET': '10.9', |
| 64 | 'OTHER_CFLAGS': [ |
| 65 | '-std=c++11', |
| 66 | '-stdlib=libc++' |
| 67 | ] |
| 68 | } |
Alexander Staubo | 425e46c | 2015-04-05 01:33:58 -0400 | [diff] [blame] | 69 | }] |
| 70 | ], |
murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 71 | "target_name": "grpc", |
| 72 | "sources": [ |
murgatroid99 | 9df2693 | 2015-01-26 17:17:59 -0800 | [diff] [blame] | 73 | "ext/byte_buffer.cc", |
| 74 | "ext/call.cc", |
| 75 | "ext/channel.cc", |
| 76 | "ext/completion_queue_async_worker.cc", |
| 77 | "ext/credentials.cc", |
murgatroid99 | 9df2693 | 2015-01-26 17:17:59 -0800 | [diff] [blame] | 78 | "ext/node_grpc.cc", |
| 79 | "ext/server.cc", |
| 80 | "ext/server_credentials.cc", |
murgatroid99 | 9df2693 | 2015-01-26 17:17:59 -0800 | [diff] [blame] | 81 | "ext/timeval.cc" |
murgatroid99 | e506151 | 2015-01-12 18:14:35 -0800 | [diff] [blame] | 82 | ] |
| 83 | } |
| 84 | ] |
| 85 | } |