scroggo | 3e56227 | 2015-03-25 10:22:41 -0700 | [diff] [blame] | 1 | # Copyright 2015 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
mtklein | d6043b2 | 2014-06-16 20:21:06 -0700 | [diff] [blame] | 5 | { |
| 6 | 'variables': { |
| 7 | 'skia_warnings_as_errors': 0, |
| 8 | }, |
| 9 | 'targets': [{ |
| 10 | # Draws pictures cross-process. |
| 11 | 'target_name': 'nanomsg_picture_demo', |
| 12 | 'type': 'executable', |
| 13 | 'dependencies': [ |
| 14 | 'skia_lib.gyp:skia_lib', |
| 15 | 'flags.gyp:flags', |
| 16 | 'libnanomsg', |
| 17 | ], |
| 18 | 'sources': [ '../experimental/nanomsg/picture_demo.cpp' ], |
| 19 | },{ |
| 20 | 'target_name': 'libnanomsg', |
| 21 | 'type': 'static_library', |
| 22 | |
| 23 | # Clients can include nanomsg public header foo.h with #include "nanomsg/src/foo.h" |
| 24 | 'direct_dependent_settings': { |
| 25 | 'include_dirs': [ '../third_party/externals' ] |
| 26 | }, |
| 27 | |
mtklein | d6043b2 | 2014-06-16 20:21:06 -0700 | [diff] [blame] | 28 | 'sources': [ |
mtklein | b91f756 | 2015-05-16 15:47:10 -0700 | [diff] [blame] | 29 | '<!@(python find.py ../third_party/externals/nanomsg/src "*.c")' |
mtklein | d6043b2 | 2014-06-16 20:21:06 -0700 | [diff] [blame] | 30 | ], |
| 31 | |
| 32 | # TODO(mtklein): Support Windows? |
| 33 | # To refresh: cd third_party/externals/nanomsg; ./autogen.sh; ./configure; copy from Makefile. |
| 34 | 'conditions': [ |
| 35 | ['skia_os == "linux"', { |
mtklein | 8f394d4 | 2014-08-04 13:11:19 -0700 | [diff] [blame] | 36 | 'cflags': [ '-w' ], |
mtklein | 80bdded | 2014-08-04 09:36:45 -0700 | [diff] [blame] | 37 | 'libraries': [ |
| 38 | '-lpthread', |
| 39 | '-lanl', # Provides getaddrinfo_a and co. |
| 40 | ], |
mtklein | d6043b2 | 2014-06-16 20:21:06 -0700 | [diff] [blame] | 41 | 'direct_dependent_settings': { |
mtklein | 80bdded | 2014-08-04 09:36:45 -0700 | [diff] [blame] | 42 | 'libraries': [ '-lpthread', '-lanl' ], |
mtklein | d6043b2 | 2014-06-16 20:21:06 -0700 | [diff] [blame] | 43 | }, |
| 44 | 'defines=': [ # equals sign throws away most Skia defines (just noise) |
| 45 | 'HAVE_ACCEPT4', |
| 46 | 'HAVE_ARPA_INET_H', |
| 47 | 'HAVE_CLOCK_GETTIME', |
| 48 | 'HAVE_DLFCN_H', |
| 49 | 'HAVE_EPOLL_CREATE', |
| 50 | 'HAVE_EVENTFD', |
| 51 | 'HAVE_GETIFADDRS', |
| 52 | 'HAVE_INTTYPES_H', |
| 53 | 'HAVE_MEMORY_H', |
| 54 | 'HAVE_NETDB_H', |
| 55 | 'HAVE_NETINET_IN_H', |
| 56 | 'HAVE_PIPE', |
| 57 | 'HAVE_PIPE2', |
| 58 | 'HAVE_POLL', |
| 59 | 'HAVE_PTHREAD_PRIO_INHERIT', |
| 60 | 'HAVE_STDINT_H', |
| 61 | 'HAVE_STDLIB_H', |
| 62 | 'HAVE_STRINGS_H', |
| 63 | 'HAVE_STRING_H', |
| 64 | 'HAVE_SYS_IOCTL_H', |
| 65 | 'HAVE_SYS_SOCKET_H', |
| 66 | 'HAVE_SYS_STAT_H', |
| 67 | 'HAVE_SYS_TYPES_H', |
| 68 | 'HAVE_UNISTD_H', |
| 69 | 'HAVE_UNISTD_H', |
| 70 | 'NN_HAVE_ACCEPT4', |
| 71 | 'NN_HAVE_CLANG', |
| 72 | 'NN_HAVE_EVENTFD', |
| 73 | 'NN_HAVE_GCC', |
| 74 | 'NN_HAVE_GETADDRINFO_A', |
| 75 | 'NN_HAVE_LINUX', |
| 76 | 'NN_HAVE_PIPE', |
| 77 | 'NN_HAVE_PIPE2', |
| 78 | 'NN_HAVE_POLL', |
| 79 | 'NN_HAVE_SEMAPHORE', |
| 80 | 'NN_HAVE_SOCKETPAIR', |
| 81 | 'NN_USE_EPOLL', |
| 82 | 'NN_USE_EVENTFD', |
| 83 | 'NN_USE_IFADDRS', |
| 84 | 'STDC_HEADERS', |
| 85 | '_GNU_SOURCE', |
| 86 | ], |
| 87 | }], |
| 88 | ['skia_os == "mac"', { |
mtklein | c97570c | 2014-12-15 12:24:46 -0800 | [diff] [blame] | 89 | 'xcode_settings': { |
| 90 | 'WARNING_CFLAGS': [ '-w' ], |
| 91 | }, |
mtklein | d6043b2 | 2014-06-16 20:21:06 -0700 | [diff] [blame] | 92 | 'defines=': [ # equals sign throws away most Skia defines (just noise) |
| 93 | 'HAVE_ARPA_INET_H', |
| 94 | 'HAVE_DLFCN_H', |
| 95 | 'HAVE_GETIFADDRS', |
| 96 | 'HAVE_INTTYPES_H', |
| 97 | 'HAVE_KQUEUE', |
| 98 | 'HAVE_MEMORY_H', |
| 99 | 'HAVE_NETDB_H', |
| 100 | 'HAVE_NETINET_IN_H', |
| 101 | 'HAVE_PIPE', |
| 102 | 'HAVE_POLL', |
| 103 | 'HAVE_PTHREAD_PRIO_INHERIT', |
| 104 | 'HAVE_STDINT_H', |
| 105 | 'HAVE_STDLIB_H', |
| 106 | 'HAVE_STRINGS_H', |
| 107 | 'HAVE_STRING_H', |
| 108 | 'HAVE_SYS_IOCTL_H', |
| 109 | 'HAVE_SYS_SOCKET_H', |
| 110 | 'HAVE_SYS_STAT_H', |
| 111 | 'HAVE_SYS_TYPES_H', |
| 112 | 'HAVE_UNISTD_H', |
| 113 | 'NN_HAVE_CLANG', |
| 114 | 'NN_HAVE_GCC', |
| 115 | 'NN_HAVE_OSX', |
| 116 | 'NN_HAVE_PIPE', |
| 117 | 'NN_HAVE_POLL', |
| 118 | 'NN_HAVE_SEMAPHORE', |
| 119 | 'NN_HAVE_SOCKETPAIR', |
| 120 | 'NN_USE_IFADDRS', |
| 121 | 'NN_USE_KQUEUE', |
| 122 | 'NN_USE_PIPE', |
| 123 | 'STDC_HEADERS', |
| 124 | '_THREAD_SAFE', |
| 125 | ], |
| 126 | }], |
| 127 | ] |
| 128 | }] |
| 129 | } |