Debian Codegraph @

rest-extras/meson.build

raw
1 librest_extras_pkg_string = 'rest-extras-@0@'.format(librest_api_version)
2
3 librest_extras_sources = [
4 'flickr-proxy.c',
5 'flickr-proxy-call.c',
6 'lastfm-proxy.c',
7 'lastfm-proxy-call.c',
8 'youtube-proxy.c',
9 ]
10
11 librest_extras_headers = [
12 'rest-extras.h',
13 'flickr-proxy.h',
14 'flickr-proxy-call.h',
15 'lastfm-proxy.h',
16 'lastfm-proxy-call.h',
17 'youtube-proxy.h',
18 ]
19
20 librest_extras_deps = [
21 glib_dep,
22 libsoup_dep,
23 libxml_dep,
24 librest_dep,
25 config_dep,
26 ]
27
28 librest_extras_c_args = [
29 '-DG_LOG_DOMAIN="Rest"',
30 ]
31
32 librest_extras_lib = library(librest_extras_pkg_string,
33 librest_extras_sources,
34 dependencies: librest_extras_deps,
35 c_args: librest_extras_c_args,
36 version: librest_module_version,
37 soversion: librest_soversion,
38 install: true,
39 )
40
41 install_headers(librest_extras_headers,
42 subdir: librest_pkg_string / 'rest-extras',
43 )
44
45 librest_extras_dep = declare_dependency(
46 link_with: librest_extras_lib,
47 )
48
49 if get_option('vapi') and not get_option('introspection')
50 warning('Vapi generation needs "introspection" option in order to generate the .vapi file')
51 endif
52
53 if get_option('introspection')
54 librest_extras_gir = gnome.generate_gir(librest_extras_lib,
55 sources: librest_extras_sources + librest_extras_headers,
56 namespace: 'RestExtras',
57 symbol_prefix: 'rest_extras',
58 identifier_prefix: 'RestExtras',
59 header: 'rest-extras/rest-extras.h',
60 nsversion: librest_api_version,
61 includes: [ 'GObject-2.0', 'Gio-2.0', 'Soup-@0@'.format(libsoup_api_version), librest_gir[0] ],
62 extra_args: [ '--accept-unprefixed' ],
63 dependencies: librest_extras_deps,
64 install: true,
65 )
66
67 if get_option('vapi')
68 librest_extras_vapi = gnome.generate_vapi(librest_extras_pkg_string,
69 sources: librest_extras_gir [0],
70 packages: [ 'glib-2.0', 'libsoup-@0@'.format(libsoup_api_version), librest_vapi ],
71 install: true,
72 )
73 endif
74 endif
75
76 # Test suite
77 test_runner_c_args = [
78 '-DBUILD_TESTS',
79 ]
80
81 test_runner_bin = executable('test-runner',
82 [ 'test-runner.c', librest_extras_sources ],
83 dependencies: librest_extras_deps,
84 c_args: test_runner_c_args,
85 )
86
87 test('test-runner', test_runner_bin,
88 suite: 'rest-extras',
89 )