blob: b09bd42d7faa5f4e03eee00c85d3a7aac97cad55 [file] [log] [blame]
scroggo3e562272015-03-25 10:22:41 -07001# 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.
mtkleind6043b22014-06-16 20:21:06 -07005{
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
mtkleind6043b22014-06-16 20:21:06 -070028 'sources': [
mtkleinada5a442016-08-02 14:28:26 -070029 '<!@(python find.py "*.c" ../third_party/externals/nanomsg/src)'
mtkleind6043b22014-06-16 20:21:06 -070030 ],
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"', {
mtklein8f394d42014-08-04 13:11:19 -070036 'cflags': [ '-w' ],
mtklein80bdded2014-08-04 09:36:45 -070037 'libraries': [
38 '-lpthread',
39 '-lanl', # Provides getaddrinfo_a and co.
40 ],
mtkleind6043b22014-06-16 20:21:06 -070041 'direct_dependent_settings': {
mtklein80bdded2014-08-04 09:36:45 -070042 'libraries': [ '-lpthread', '-lanl' ],
mtkleind6043b22014-06-16 20:21:06 -070043 },
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"', {
mtkleinc97570c2014-12-15 12:24:46 -080089 'xcode_settings': {
90 'WARNING_CFLAGS': [ '-w' ],
91 },
mtkleind6043b22014-06-16 20:21:06 -070092 '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}