diff options
Diffstat (limited to 'src/service/dht/meson.build')
-rw-r--r-- | src/service/dht/meson.build | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/src/service/dht/meson.build b/src/service/dht/meson.build new file mode 100644 index 000000000..45157243d --- /dev/null +++ b/src/service/dht/meson.build | |||
@@ -0,0 +1,97 @@ | |||
1 | libgnunetdht_src = ['dht_api.c'] | ||
2 | |||
3 | gnunetservicedht_src = ['gnunet-service-dht.c', | ||
4 | 'plugin_dhtu_gnunet.c', | ||
5 | 'plugin_dhtu_ip.c', | ||
6 | 'gnunet-service-dht_datacache.c', | ||
7 | 'gnunet-service-dht_neighbours.c', | ||
8 | 'gnunet-service-dht_routing.c'] | ||
9 | |||
10 | configure_file(input : 'dht.conf.in', | ||
11 | output : 'dht.conf', | ||
12 | configuration : cdata, | ||
13 | install: true, | ||
14 | install_dir: pkgcfgdir) | ||
15 | |||
16 | configure_file(input : 'dhtu.conf', | ||
17 | output : 'dhtu.conf', | ||
18 | configuration : cdata, | ||
19 | install: true, | ||
20 | install_dir: pkgcfgdir) | ||
21 | |||
22 | if get_option('monolith') | ||
23 | foreach p : libgnunetdht_src + gnunetservicedht_src | ||
24 | gnunet_src += 'dht/' + p | ||
25 | endforeach | ||
26 | endif | ||
27 | |||
28 | libgnunetdht = library('gnunetdht', | ||
29 | libgnunetdht_src, | ||
30 | soversion: '4', | ||
31 | version: '4.0.0', | ||
32 | dependencies: libgnunetutil_dep, | ||
33 | include_directories: [incdir, configuration_inc], | ||
34 | install: true, | ||
35 | install_dir: get_option('libdir')) | ||
36 | libgnunetdht_dep = declare_dependency(link_with : libgnunetdht) | ||
37 | pkg.generate(libgnunetdht, url: 'https://www.gnunet.org', | ||
38 | description : 'Provides API for the R5N distributed hash table') | ||
39 | |||
40 | executable ('gnunet-service-dht', | ||
41 | gnunetservicedht_src, | ||
42 | dependencies: [libgnunetdht_dep, libgnunetutil_dep, | ||
43 | libgnunetblock_dep, | ||
44 | libgnunetcore_dep, | ||
45 | libgnunetnse_dep, | ||
46 | libgnunettransportapplication_dep, | ||
47 | libgnunetpeerstore_dep, | ||
48 | m_dep, | ||
49 | libgnunetdatacache_dep, | ||
50 | libgnunetstatistics_dep, | ||
51 | libgnunetblockgroup_dep, | ||
52 | libgnunethello_dep], | ||
53 | include_directories: [incdir, configuration_inc], | ||
54 | install: true, | ||
55 | install_dir: get_option('libdir')/'gnunet'/'libexec') | ||
56 | |||
57 | libgnunettestingdhtu = library('gnunettestingdhtu', | ||
58 | ['testing_dhtu_cmd_send.c'], | ||
59 | soversion: '0', | ||
60 | version: '0.0.0', | ||
61 | dependencies: [ | ||
62 | libgnunetutil_dep, | ||
63 | libgnunetarm_dep, | ||
64 | libgnunettesting_dep | ||
65 | ], | ||
66 | include_directories: [incdir, configuration_inc], | ||
67 | install: true, | ||
68 | install_dir: get_option('libdir')) | ||
69 | libgnunettestingdhtu_dep = declare_dependency(link_with : libgnunettestingdhtu) | ||
70 | |||
71 | configure_file(input : 'test_dht_api_data.conf', | ||
72 | output : 'test_dht_api_data.conf', | ||
73 | copy: true) | ||
74 | |||
75 | testdht_api = executable ('test_dht_api', | ||
76 | ['test_dht_api.c'], | ||
77 | dependencies: [libgnunetdht_dep, | ||
78 | libgnunetutil_dep, | ||
79 | libgnunettesting_dep, | ||
80 | libgnunethello_dep], | ||
81 | include_directories: [incdir, configuration_inc], | ||
82 | install: false) | ||
83 | |||
84 | test('test_dht_api', testdht_api, suite: 'dht', | ||
85 | workdir: meson.current_build_dir()) | ||
86 | |||
87 | testdhtu_ip = executable('test_dhtu_ip', | ||
88 | ['test_dhtu_ip.c'], | ||
89 | dependencies: [libgnunetutil_dep, | ||
90 | libgnunettesting_dep], | ||
91 | include_directories: [incdir, configuration_inc], | ||
92 | install: false) | ||
93 | |||
94 | test('test_dhtu_ip', testdhtu_ip, suite: 'dhtu', | ||
95 | workdir: meson.current_build_dir()) | ||
96 | |||
97 | |||