diff options
Diffstat (limited to 'src/contrib/service/consensus/meson.build')
-rw-r--r-- | src/contrib/service/consensus/meson.build | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/contrib/service/consensus/meson.build b/src/contrib/service/consensus/meson.build new file mode 100644 index 000000000..86cc0663b --- /dev/null +++ b/src/contrib/service/consensus/meson.build | |||
@@ -0,0 +1,66 @@ | |||
1 | libgnunetconsensus_src = ['consensus_api.c'] | ||
2 | |||
3 | gnunetserviceconsensus_src = ['gnunet-service-consensus.c'] | ||
4 | |||
5 | configure_file(input : 'consensus.conf.in', | ||
6 | output : 'consensus.conf', | ||
7 | configuration : cdata, | ||
8 | install: true, | ||
9 | install_dir: pkgcfgdir) | ||
10 | |||
11 | # FIXME needs new seti/setu | ||
12 | if get_option('monolith') | ||
13 | #foreach p : libgnunetconsensus_src + gnunetserviceconsensus_src | ||
14 | # gnunet_src += 'consensus/' + p | ||
15 | #endforeach | ||
16 | endif | ||
17 | |||
18 | libgnunetconsensus = shared_library('gnunetconsensus', | ||
19 | libgnunetconsensus_src, | ||
20 | soversion: '0', | ||
21 | version: '0.0.0', | ||
22 | dependencies: libgnunetutil_dep, | ||
23 | include_directories: [incdir, configuration_inc], | ||
24 | install: true, | ||
25 | install_dir: get_option('libdir')) | ||
26 | pkg.generate(libgnunetconsensus, url: 'https://www.gnunet.org', | ||
27 | description : 'Provides API for accessing the consensus service') | ||
28 | libgnunetarm_dep = declare_dependency(link_with : libgnunetarm) | ||
29 | libgnunetconsensus_dep = declare_dependency(link_with : libgnunetconsensus) | ||
30 | |||
31 | shared_module('gnunet_plugin_block_consensus', | ||
32 | ['plugin_block_consensus.c'], | ||
33 | dependencies: [libgnunetutil_dep, | ||
34 | libgnunetblock_dep], | ||
35 | include_directories: [incdir, configuration_inc], | ||
36 | install:true, | ||
37 | install_dir: get_option('libdir')/'gnunet') | ||
38 | |||
39 | executable ('gnunet-service-consensus', | ||
40 | gnunetserviceconsensus_src, | ||
41 | dependencies: [libgnunetconsensus_dep, | ||
42 | libgnunetutil_dep, | ||
43 | libgnunetset_dep, | ||
44 | libgnunetstatistics_dep], | ||
45 | include_directories: [incdir, configuration_inc], | ||
46 | install: true, | ||
47 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') | ||
48 | |||
49 | # FIXME do we need evil stuff and ENABLE_MALICIOUS? | ||
50 | |||
51 | testconsensusapi = executable ('test_consensus_api', | ||
52 | ['test_consensus_api.c'], | ||
53 | dependencies: [libgnunetconsensus_dep, | ||
54 | libgnunetutil_dep, | ||
55 | libgnunettesting_dep], | ||
56 | include_directories: [incdir, configuration_inc], | ||
57 | install: false) | ||
58 | |||
59 | configure_file(input : 'test_consensus.conf', | ||
60 | output : 'test_consensus.conf', | ||
61 | configuration : cdata, | ||
62 | install: false) | ||
63 | |||
64 | test('test_consensus_api', testconsensusapi, | ||
65 | workdir: meson.current_build_dir(), | ||
66 | suite: ['consensus', 'contrib']) | ||