Imported Upstream version 0.1.17
[platform/upstream/libnice.git] / agent / meson.build
1 agent_headers = files([
2   'address.h',
3   'agent.h',
4   'candidate.h',
5   'debug.h',
6   'interfaces.h',
7   'pseudotcp.h',
8 ])
9 install_headers(agent_headers, subdir : 'nice')
10 agent_include = include_directories('.')
11
12 agent_sources = files([
13   'address.c',
14   'agent.c',
15   'candidate.c',
16   'component.c',
17   'conncheck.c',
18   'debug.c',
19   'discovery.c',
20   'inputstream.c',
21   'interfaces.c',
22   'iostream.c',
23   'outputstream.c',
24   'pseudotcp.c',
25   'stream.c',
26 ])
27
28 gnome = import('gnome')
29
30 agent_enum_types_c =  gnome.mkenums('agent-enum-types.c', sources : agent_headers,
31                                     fhead: '#include <config.h>\n#include <glib-object.h>\n#include "agent.h"\n#include "pseudotcp.h"\n#include "agent-enum-types.h"',
32                                     fprod: '\n/* enumerations from "@filename@" */',
33                                     vhead: 'GType\n@enum_name@_get_type (void)\n{\n  static GType type = 0;\n  if (!type) {\n    static const G@Type@Value values[] = {',
34                                     vprod: '      { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
35                                     vtail: '      { 0, NULL, NULL }\n    };\n    type = g_@type@_register_static ("@EnumName@", values);\n  }\n  return type;\n}\n\n')
36
37 agent_enum_types_h = gnome.mkenums('agent-enum-types.h', sources : agent_headers,
38                                    fhead: '#ifndef __AGENT_ENUM_TYPES_H__\n#define __AGENT_ENUM_TYPES_H__ 1\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n',
39                                    fprod: '/* enumerations from "@filename@" */\n',
40                                    vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define NICE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
41                                           ftail: 'G_END_DECLS\n\n#endif /* !AGENT_ENUM_TYPES_H */')
42
43
44 libagent = static_library('agent',
45   agent_enum_types_c, agent_enum_types_h, agent_sources,
46   c_args: ['-DG_LOG_DOMAIN="libnice"'],
47   include_directories: nice_incs,
48   dependencies: nice_deps,
49   install: false)