diff options
Diffstat (limited to 'src/service/dht/meson.build')
-rw-r--r-- | src/service/dht/meson.build | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/service/dht/meson.build b/src/service/dht/meson.build new file mode 100644 index 000000000..3972a0983 --- /dev/null +++ b/src/service/dht/meson.build | |||
@@ -0,0 +1,59 @@ | |||
1 | libgnunetdht_src = ['dht_api.c'] | ||
2 | |||
3 | gnunetservicedht_src = ['gnunet-service-dht.c', | ||
4 | 'gnunet-service-dht_datacache.c', | ||
5 | 'gnunet-service-dht_neighbours.c', | ||
6 | 'gnunet-service-dht_routing.c'] | ||
7 | |||
8 | configure_file(input : 'dht.conf.in', | ||
9 | output : 'dht.conf', | ||
10 | configuration : cdata, | ||
11 | install: true, | ||
12 | install_dir: pkgcfgdir) | ||
13 | |||
14 | if get_option('monolith') | ||
15 | foreach p : libgnunetdht_src + gnunetservicedht_src | ||
16 | gnunet_src += 'dht/' + p | ||
17 | endforeach | ||
18 | endif | ||
19 | |||
20 | libgnunetdht = library('gnunetdht', | ||
21 | libgnunetdht_src, | ||
22 | soversion: '4', | ||
23 | version: '4.0.0', | ||
24 | dependencies: libgnunetutil_dep, | ||
25 | include_directories: [incdir, configuration_inc], | ||
26 | install: true, | ||
27 | install_dir: get_option('libdir')) | ||
28 | libgnunetdht_dep = declare_dependency(link_with : libgnunetdht) | ||
29 | pkg.generate(libgnunetdht, url: 'https://www.gnunet.org', | ||
30 | description : 'Provides API for the R5N distributed hash table') | ||
31 | |||
32 | executable ('gnunet-service-dht', | ||
33 | gnunetservicedht_src, | ||
34 | dependencies: [libgnunetdht_dep, libgnunetutil_dep, | ||
35 | libgnunetblock_dep, | ||
36 | m_dep, | ||
37 | libgnunetdatacache_dep, | ||
38 | libgnunetstatistics_dep, | ||
39 | libgnunetblockgroup_dep, | ||
40 | libgnunethello_dep], | ||
41 | include_directories: [incdir, configuration_inc], | ||
42 | install: true, | ||
43 | install_dir: get_option('libdir')/'gnunet'/'libexec') | ||
44 | |||
45 | configure_file(input : 'test_dht_api_data.conf', | ||
46 | output : 'test_dht_api_data.conf', | ||
47 | copy: true) | ||
48 | |||
49 | testdht_api = executable ('test_dht_api', | ||
50 | ['test_dht_api.c'], | ||
51 | dependencies: [libgnunetdht_dep, | ||
52 | libgnunetutil_dep, | ||
53 | libgnunettesting_dep, | ||
54 | libgnunethello_dep], | ||
55 | include_directories: [incdir, configuration_inc], | ||
56 | install: false) | ||
57 | |||
58 | test('test_dht_api', testdht_api, suite: 'dht', | ||
59 | workdir: meson.current_build_dir()) | ||