aboutsummaryrefslogtreecommitdiff
path: root/src/service/peerstore/meson.build
blob: 2c6f7eba8d226a1c60c6b657fc8bd1a3dc9f97d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
libgnunetpeerstore_src = ['peerstore_api.c',
                          'peerstore_common.c']

gnunetservicepeerstore_src = ['gnunet-service-peerstore.c']

configure_file(input : 'peerstore.conf.in',
               output : 'peerstore.conf',
               configuration : cdata,
               install: true,
               install_dir: pkgcfgdir)


if get_option('monolith')
  foreach p : libgnunetpeerstore_src + gnunetservicepeerstore_src
    gnunet_src += 'peerstore/' + p
  endforeach
endif

libgnunetpeerstore = library('gnunetpeerstore',
        libgnunetpeerstore_src,
        soversion: '0',
        version: '0.0.0',
        dependencies: [libgnunetutil_dep, libgnunethello_dep],
        include_directories: [incdir, configuration_inc],
        install: true,
        install_dir: get_option('libdir'))
pkg.generate(libgnunetpeerstore, url: 'https://www.gnunet.org',
             description : 'Provides API for accessing the peerstore service')
libgnunetpeerstore_dep = declare_dependency(link_with : libgnunetpeerstore)

executable ('gnunet-service-peerstore',
            gnunetservicepeerstore_src,
            dependencies: [libgnunetpeerstore_dep,
                           libgnunetutil_dep,
                           libgnunethello_dep],
            include_directories: [incdir, configuration_inc],
            install: true,
            install_dir: get_option('libdir') / 'gnunet' / 'libexec')

testpeerstore_api_iterate = executable ('test_peerstore_api_iterate',
            ['test_peerstore_api_iterate.c'],
            dependencies: [
              libgnunetpeerstore_dep,
              libgnunettesting_dep,
              libgnunetutil_dep
              ],
            include_directories: [incdir, configuration_inc],
            install: false)

testpeerstore_api_store = executable ('test_peerstore_api_store',
            ['test_peerstore_api_store.c'],
            dependencies: [
              libgnunetpeerstore_dep,
              libgnunetutil_dep,
              libgnunettesting_dep,
              ],
            include_directories: [incdir, configuration_inc],
            install: false)

testpeerstore_api_watch = executable ('test_peerstore_api_watch',
            ['test_peerstore_api_watch.c'],
            dependencies: [
              libgnunetpeerstore_dep,
              libgnunetutil_dep,
              libgnunettesting_dep,
              ],
            include_directories: [incdir, configuration_inc],
            install: false)
testpeerstore_api_perf = executable ('perf_peerstore_store',
            ['perf_peerstore_store.c'],
            dependencies: [
              libgnunetpeerstore_dep,
              libgnunetutil_dep,
              libgnunettesting_dep,
              ],
            include_directories: [incdir, configuration_inc],
            install: false)

configure_file(input : 'test_peerstore_api_data.conf',
               output : 'test_peerstore_api_data.conf',
               copy: true)

test('test_peerstore_api_store', testpeerstore_api_store,
  suite: 'peerstore', workdir: meson.current_build_dir())
test('test_peerstore_api_watch', testpeerstore_api_watch,
  suite: 'peerstore', workdir: meson.current_build_dir())
test('test_peerstore_api_iterate', testpeerstore_api_iterate,
  suite: 'peerstore', workdir: meson.current_build_dir())
test('perf_peerstore_store', testpeerstore_api_perf,
  suite: 'peerstore', workdir: meson.current_build_dir())