diff options
Diffstat (limited to 'src/service/core/meson.build')
-rw-r--r-- | src/service/core/meson.build | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/src/service/core/meson.build b/src/service/core/meson.build new file mode 100644 index 000000000..483aa0a11 --- /dev/null +++ b/src/service/core/meson.build | |||
@@ -0,0 +1,112 @@ | |||
1 | libgnunetcore_src = ['core_api.c', | ||
2 | 'core_api_monitor_peers.c'] | ||
3 | |||
4 | gnunetservicecore_src = ['gnunet-service-core.c', | ||
5 | 'gnunet-service-core_kx.c', | ||
6 | 'gnunet-service-core_sessions.c', | ||
7 | 'gnunet-service-core_typemap.c'] | ||
8 | |||
9 | configure_file(input : 'core.conf.in', | ||
10 | output : 'core.conf', | ||
11 | configuration : cdata, | ||
12 | install: true, | ||
13 | install_dir: pkgcfgdir) | ||
14 | |||
15 | |||
16 | if get_option('monolith') | ||
17 | foreach p : libgnunetcore_src + gnunetservicecore_src | ||
18 | gnunet_src += 'core/' + p | ||
19 | endforeach | ||
20 | endif | ||
21 | |||
22 | libgnunetcore = library('gnunetcore', | ||
23 | libgnunetcore_src, | ||
24 | dependencies: libgnunetutil_dep, | ||
25 | include_directories: [incdir, configuration_inc], | ||
26 | install: true, | ||
27 | soversion: '0', | ||
28 | version: '0.0.1', | ||
29 | install_dir: get_option('libdir')) | ||
30 | libgnunetcore_dep = declare_dependency(link_with : libgnunetcore) | ||
31 | pkg.generate(libgnunetcore, url: 'https://www.gnunet.org', | ||
32 | description : 'Provides API for (encrypted) P2P communication') | ||
33 | |||
34 | libgnunetcoretesting = library('gnunetcoretesting', | ||
35 | ['core_api_cmd_connecting_peers.c'], | ||
36 | dependencies: [ | ||
37 | libgnunetutil_dep, | ||
38 | libgnunettesting_dep, | ||
39 | libgnunetarm_dep, | ||
40 | libgnunettransportapplication_dep, | ||
41 | libgnunettransportcore_dep, | ||
42 | ], | ||
43 | include_directories: [incdir, configuration_inc], | ||
44 | install: true, | ||
45 | soversion: '0', | ||
46 | version: '0.0.0', | ||
47 | install_dir: get_option('libdir')) | ||
48 | libgnunetcoretesting_dep = declare_dependency(link_with : libgnunetcoretesting) | ||
49 | |||
50 | shared_module('gnunet_test_core_plugin_cmd_just_run', | ||
51 | ['test_core_plugin_cmd_just_run.c'], | ||
52 | dependencies: [libgnunetutil_dep, | ||
53 | libgnunettesting_dep, | ||
54 | libgnunetcoretesting_dep, | ||
55 | libgnunettransportcore_dep, | ||
56 | libgnunettransportapplication_dep, | ||
57 | libgnunettesting_dep, | ||
58 | libgnunetpeerstore_dep, | ||
59 | libgnunetstatistics_dep, | ||
60 | libgnunethello_dep, | ||
61 | libgnunetarm_dep | ||
62 | ], | ||
63 | include_directories: [incdir, configuration_inc], | ||
64 | install: true, | ||
65 | install_dir: get_option('libdir')/'gnunet') | ||
66 | |||
67 | executable ('gnunet-service-core', | ||
68 | gnunetservicecore_src, | ||
69 | dependencies: [libgnunetcore_dep, libgnunetutil_dep, | ||
70 | libgnunetstatistics_dep, | ||
71 | libgnunettransportcore_dep, | ||
72 | zlib_dep], | ||
73 | include_directories: [incdir, configuration_inc], | ||
74 | install: true, | ||
75 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') | ||
76 | |||
77 | configure_file(input : 'test_core_defaults.conf', | ||
78 | output : 'test_core_defaults.conf', | ||
79 | copy: true) | ||
80 | |||
81 | configure_file(input : 'test_core_api_send_to_self.conf', | ||
82 | output : 'test_core_api_send_to_self.conf', | ||
83 | copy: true) | ||
84 | |||
85 | configure_file(input : 'test_core_api_peer1.conf', | ||
86 | output : 'test_core_api_peer1.conf', | ||
87 | copy: true) | ||
88 | |||
89 | testcore_api_send_self = executable ('test_core_api_send_to_self', | ||
90 | ['test_core_api_send_to_self.c'], | ||
91 | dependencies: [ | ||
92 | libgnunetcore_dep, | ||
93 | libgnunetutil_dep, | ||
94 | libgnunettesting_dep | ||
95 | ], | ||
96 | include_directories: [incdir, configuration_inc], | ||
97 | install: false) | ||
98 | |||
99 | testcore_api_start = executable ('test_core_api_start_only', | ||
100 | ['test_core_api_send_to_self.c'], | ||
101 | dependencies: [ | ||
102 | libgnunetcore_dep, | ||
103 | libgnunetutil_dep, | ||
104 | libgnunettesting_dep | ||
105 | ], | ||
106 | include_directories: [incdir, configuration_inc], | ||
107 | install: false) | ||
108 | |||
109 | test('test_core_api_send_to_self', testcore_api_send_self, | ||
110 | suite: 'core', workdir: meson.current_build_dir()) | ||
111 | test('test_core_api_start_only', testcore_api_start, | ||
112 | suite: 'core', workdir: meson.current_build_dir()) | ||